
Tmux 1.9 released - jc79
http://sourceforge.net/p/tmux/tmux-code/ci/master/tree/CHANGES
======
lsiebert
I have to say that the tmux-users mailing list in general, and Nicholas
Marriott in particular, are really nice and friendly.

I had a feature request (256 colors in fbterm so you can get 256 color
tmux/vim without x), quickly got patch code, got support (I had never used
patch before and didn't tell it to ignore whitespace) and when it worked, was
told it would be in 1.9, and there it is. :-)

~~~
H3g3m0n
Just spent half an hour trying to figure out why 256 color mode stopped
working in Vim.

I'm blaming you =P

In all seriousness actually trying to get 256 colour mode auto detecting and
working reliability across different xterms, tmux/screen, ssh and so on,
without some hack that forces the 256 on even when it's not supported seems
impossible :/

I added the following to my zshrc, which seems to have helped. Why don't these
terminals report 256 color mode by default?

    
    
        if [ "$COLORTERM" == "yes" -a "$TERM" == "xterm" ]; then
           export TERM=xterm-256color
        fi

~~~
lsiebert
The escape sequences to set 256 colors were previously hardcoded into tmux,
instead of detected from terminfo. That works fine, until you use a program
that uses different escape sequences.

I suspect terminals don't set 256 colors by default for backward compatibility
reasons. tmux itself didn't assume, you needed something in your config file
or a command line option. Now though, I believe it can detect it based on your
term.

------
mbillie1
An absolute staple of my development setup, and one of those rare tools that
always just seems to work. Thanks for all the work!

Sidebar: if you're a die-hard tmux user in Linux, and you do something like,
say, open vim and then realize you haven't opened it in tmux, check out
[https://github.com/nelhage/reptyr](https://github.com/nelhage/reptyr) \- it
lets you do things like ctrl-z to background vim, start tmux, then steal the
vim process into your new tmux session. Pretty cool!

~~~
saosebastiao
I love and use tux all the time, but for me it doesn't always just work. I
regularly run into weird backspace/delete behavior when using tmux with ssh.
For example, ssh from ubuntu into rhel and then running tmux will give me a
completely different behavior compared to when I tmux in ubuntu and then ssh
into rhel. I know that backspace/delete behavior has more to do with the
terminal than tmux, but gnome terminal seems to handle it fine outside of
tmux.

~~~
cfallin
I've run into this a few times, too -- seems to have something to do with the
termcap info for tmux's virtual term. FWIW, I was able to work around it with
'stty', e.g.:

$ stty erase ^?

to recognize DEL (ASCII 127, or ^?) as backspace. I have that in my .bashrc on
a particular machine that gives me this problem...

------
CJefferson
I remember using on the mac a branch of tmux with iTerm, where the gui
understood tmux, giving native tabs and scrollback. I thought this was the
greatest thing ever, but am now on Linux. Is this work still continuing does
anyone know?

~~~
gingerlime
Isn't one of the advantages of tmux is reduce / avoid using the mouse?

I know that scrolling is one of the first non-obvious changes that seem
irritating at first. But after you get used to scrolling with the keyboard, I
find myself missing this possibility on 'standard' terminal windows.

Suddenly using the mouse to scroll feels really awkward and inefficient.

~~~
Cthulhu_
I think I can live without scrolling, but what I found most irritating when
trying tmux is selecting / copying / pasting things. ATM I use iterm with
split panes and a 'quake-style' dropdown terminal; tbh it works well enough
for me.

~~~
rjzzleep
you can scroll just fine in tmux, in fact better because you can search in
your scroll back. <c-b>[

as for selecting copying pasting. i use these options

    
    
        set -g mouse-resize-pane on
        set -g mouse-select-pane on
    

i can now select and resize panes with the mouse, and i can select while
holding the option key on the keyboard.

also if you set

    
    
        setw -g mode-mouse on
    

you can scroll back with the mouse in the scroll back buffer without having to
press c-b[ and it will still properly scroll everywhere else...
vim/weechat/etc.

on a mac, iterm2 does this natively(in linux it works anyway). but if you want
to use that in terminal or totalterminal(quake term) you'll need to install
mouseterm. I recommend using mouseterm-plus as i recall mouse term is no
longer maintained.

edit: looks like the link is dead you'll have to build it yourself
[https://github.com/saitoha/mouseterm-
plus](https://github.com/saitoha/mouseterm-plus)

------
mariusmg
If you're on Windows, ConEmu offers the same functionality. And as a bonus you
can also run windows apps inside the terminal window.

Here's how it looks
[http://i.imgur.com/dEpQYJf.jpg](http://i.imgur.com/dEpQYJf.jpg)

~~~
sdfjkl
And now you can use tmux in Cygwin.

~~~
gnoway
I've been using it in Cygwin for a long time. What is supposed to be broken?

~~~
Ives
That's strange. The patch that allows it to work has only existed for less
than a year. Tmux apparently passes file descriptors over unix domain sockets,
which isn't supported by Cygwin.

~~~
gnoway
Well by long time I mean several months. Happy coincidence I guess.

------
bigtunacan
I just wanted to say thanks for the hard work! I absolutely love this tool.
About 1/2 of my team has started using this tool since I introduced it to the
group and everyone of them loves it.

I started using tmux just because I was frustrated that I would occasionally
kill the terminal with Command + Q instead of just the current window Command
+ W. But now there is just so much of tmux that helps my daily work flow I
don't know how I ever got by without it.

------
beatgammit
> 'default-path' has been removed

This kind of annoys me, but I'm successfully using this workaround (hinted at
in the announcement):

bind c run 'tmux new-window -c "#{pane_current_path}"' bind-key '%' split-
window -hc "#{pane_current_path}" bind-key '"' split-window -vc
"#{pane_current_path}"

Anyone know why this change was made?

~~~
jparyani
For anyone else who shares tmux configs between different versions, this is a
good way to do it:

    
    
        if-shell "[[ `tmux -V` == *1.9* ]]" \
            'unbind c; bind c new-window -c "#{pane_current_path}"'

------
kelmop
Thank you! a Great piece of software that I use constantly. The world is
better place with developers like you. Go on and hug yourself.

------
remirezk
Has anyone used these, and can they give me a comparison: tmux/scree/byobu

Currently a byobu user, it seems fine so far. Wondering what others offer more
than that.

~~~
joeyoung
I use screen and tmux for different tasks.

I'll use screen when I need to run a long-running task and can't keep my
terminal session open.

I use tmux with a script so that I can ssh into multiple nodes and broadcast
the same commands to them all at the same time. Great for interactive
deployments that I haven't been able to automate away with CFEngine just yet.

~~~
krasin
if you're running it on linux, is any reason to use screen for long-running
tasks, instead of Docker?

~~~
davvid
The reason folks asked, "docker is a screen replacement?" is because one
typical use case is using screen within an ssh session where you might get
disconnected. screen holds onto the session so that you can ssh back in and
continue from where you left off.

    
    
        $ ssh hostname
        $ screen
        # some time later, you get disconnected...
        $ ssh hostname
        $ screen -x
        # back to where you were before getting disconnected.

~~~
naterator
Screen is amazing for SSH work or if you just don't want to have 50 tabs open.
I've been looking into tmux lately though for the later. I just found out
about it last week.

Seriously, the amount of commands linux has that most people don't know about
is staggering. This link[1] was on HN just the other day.

[1] [http://www.danielmiessler.com/blog/collection-of-less-
common...](http://www.danielmiessler.com/blog/collection-of-less-commonly-
used-unix-commands)

~~~
Crito
I use tmux at work to manage at times up to several dozen sessions each with
several windows/panes _(I make one session for every conceptual task that I
take on, and sessions live until I complete the task)_. In my experience it is
much more robust than screen (not as many dungeon collapses, if you know what
I mean) and well worth switching to.

------
andyhmltn
Awesome little program. It's saved so much time so far. For anyone that wants
to get up and running:

[https://github.com/andyhmltn/dotfiles](https://github.com/andyhmltn/dotfiles)

That contains two tmux config files that add a few things like CTRL+B
thenSHIFT+P for a nice layout and a shortcut for switching between panes with
ALT+Arrow keys

~~~
jc79
I personally use:

bind-key -n M-1 select-window -t 1

bind-key -n M-2 select-window -t 2

bind-key -n M-3 select-window -t 3

(...) For an IMHO even more convinient ALT+Number to switch directly to the
tab in question, just like in firefox.

~~~
andyhmltn
That's very similar to CTRL+B then Q then Number. But I have about 5+ panes so
I found using the arrow keys a lot easier

------
euoia
Here are my tmux bindings which I have been using daily for over a year. These
are configured in iTerm in the Profiles->Keys section using Send Hex Codes.

    
    
      Cmd-shift-c: New window
      Cmd-shift-l: New pane to the right
      Cmd-shift-h: New pane to the left
      Cmd-shift-k: New pane above
      Cmd-shift-j: New pane below
      Cmd-l: Focus pane on right
      Cmd-h: Focus pane on left
      Cmd-k: Focus pane above
      Cmd-j: Focus pane below
      Cmd-1: Select first window
      Cmd-2: Select second window
      ...
      Option-h: Previous window
      Option-l: Next window
      Command-/: Enter copy mode
    

I have the same bindings in MacVim. The nice thing about using command is that
it doesn't interfere with other cli apps like ctrl.

The following allows you to yank the tmux clipboard into the system clipboard:
[https://github.com/ChrisJohnsen/tmux-MacOSX-
pasteboard](https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard)

~~~
joeshaw
Here's a good blog post describing how to use the "Send Hex Codes" for
integrating tmux and iTerm:
[http://tangledhelix.com/blog/2012/04/28/iterm2-keymaps-
for-t...](http://tangledhelix.com/blog/2012/04/28/iterm2-keymaps-for-tmux/)

------
john2x
Moving to Emacs, I'm going to miss tmux more than I'll miss vim (there's evil-
mode).

~~~
jwr
I use emacs inside tmux all the time (on a Mac, in iTerm2). Works great.

~~~
edoloughlin
I find that if I run emacsclient and emacs server, I don't need to use tmux.
If I get disconnected, I just reconnect and run emacsclient again. All my
buffer states are preserved.

~~~
craigching
Yeah, as an emacs user, every time a tmux post pops up on HN, I go read about
it and wonder what it would really do for me. I guess what I'm seeing is that
for my emacs sessions it really doesn't buy me anything. I'd be curious to
hear about things I can do with tmux that I can't do with emacsclient and
emacs daemon.

~~~
Myrmornis
Tmux is for your shell sessions. Emacsclient is orthogonal. Or do you do all
your shell work in emacs?

~~~
craigching
> do you do all your shell work in emacs?

I do! eshell is a very good shell that integrates nicely with emacs. For
instance, I love egrep in eshell, you can move your cursor over the output and
emacs will take you right to the line that matches.

So let me temper that _just a wee bit_ , I do use eshell a lot, but there are
a few cases where it doesn't work quite well, but those cases are few and far
between, certainly not enough to warrant using tmux, at least I can't be
convinced yet.

EDIT: I said eshell integrates nicely with emacs. That's not true, it's a
shell written in elisp for emacs, no integration whatsoever. Sorry, but I
don't feel like rewording what I wrote, so just adding this edit comment ;)

~~~
unhammer
If you do any sort of work on Middling-to-Fairly-Big Data, eshell is not for
you. I love emacs, and would love to love eshell, but I prefer running
grep/awk/sed/etc in tmux since it's just soo much faster.

And of course, if you need to use any sort of curses type thing, eshell (or
M-x shell) often fails in ugly ways.

~~~
craigching
I upvoted you because I think you present a fair point, especially about "big
data" and curses programs, though I recently noticed that top is behaving well
in emacs and I don't think it was before, so maybe it's getting better and I
need to revisit some of my old workflows to see if I can incorporate them.

As for running grep/awk/sed in tmux being fast, I don't doubt running the
individual program and getting your results is faster, but the interaction in
eshell and going beyond, say, grep output and actually being able to go the
the line in question, the whole workflow, is _much_ faster than running grep
and then firing up an editor on the file and moving to the line. _That_ is the
real power, the whole workflow is made faster such that the fact that grep is
a slow elisp implementation doesn't matter. And elisp grep really isn't _that_
slow, accessing the file system is the slow part and that's true for both
implementations and both can benefit from aggressive file caching anyway.

The less I have to leave emacs during an editing session, the faster/more
productive I'll be. And that's the real power of eshell IMO.

~~~
Myrmornis
As an emacs user I do agree with what you're saying. I do all my codebase
searching using ag from emacs[1] instead of grep and I absolutely love it: you
get the results in a compilation-mode buffer which instantly jumps you to the
search hits.

Maybe I should use eshell or one of the comint shells more. But I wouldn't
want to leave bash/zsh behind -- I might as well be on windows then :) (which
is, btw, a strong argument in favor of the workflow you're describing -- for
those poor people who are forced to use windows, eshell is a blessing.)

[1] [https://github.com/Wilfred/ag.el](https://github.com/Wilfred/ag.el)

~~~
craigching
Thanks for sharing about ag, I'm going to check that out! Luckily I'm on Linux
for most of my development, but sometimes I am on Windows and you're right,
eshell is a blessing there :)

------
DArcMattr
The tmux project is part of the ones developed alongside and included in
OpenBSD, so when you support OpenBSD, you're also supporting tmux.

------
caiob
Can't wait until this gets incorporated onto Homebrew. Apparently there's
already a pull request
[https://github.com/adnissen/homebrew/commit/2b0e92805b445988...](https://github.com/adnissen/homebrew/commit/2b0e92805b445988f7c1ba9d0fd09b16d2afc087)

------
adn
Here's the working homebrew PR, if you can't wait to use it:
[https://github.com/Homebrew/homebrew/pull/26884](https://github.com/Homebrew/homebrew/pull/26884).
Should get merged pretty soon.

------
gdiocarez
Does anyone know how to save/ retrieve sessions?

~~~
joeshaw
The one downside to tmux over screen is that tmux basically requires that all
clients connecting to it have the same screen size, and by default it chooses
the smallest one. So while you can connect to an existing session, the output
might be ugly.

For this reason, I typically simply 'tmux detach;tmux attach"

~~~
tjdetwiler
tmux a -d will attach and also detach all other clients.

