2012-04-21

I use tmux a lot (having switched from GNU Screen) and frequently ssh to different hosts from different tmux windows. One thing that I find helpful is knowing which host I'm ssh'd to in each tmux window. Here is a little trick for your .bash_aliases (on every host you ssh to) which will display user@host in each tmux window title:
The first part sets the terminal's window title to user@host: /working/directory