26
12
I would love to be able to have my tmux window title automatically renamed to prompt_command, ps1 or just the hostname of a machine I ssh
to. having 9 windows opened labeled "ssh" is really useless. Doing sysadmin work I open new screens and ssh around to much to manually rename them.
One thing I noticed is tmux
updates the xterm
window title so I feel like it has to know.
Any help? I would even be willing to go back to screen
if I could get this feature.
Thanks! I used
PROMPT_COMMAND='settitle $HOSTNAME:$PWD'
- since with @Mikel's code I got no hostname and a-bash: : No such file or directory
error before each command prompt. It seems to me that the$()
would make bash try to execute whateversettitle
returns. (I'm running bash on linux.) – tuomassalo – 2018-02-09T13:34:13.820This really dont name the window title to the hostname of remote box with out having the .bashrc setup on the remote box. Thank you though I did learn some slick. – user68782 – 2011-03-04T03:31:26.943
If all you want is the hostname on your local side, that's much easier. Hang on a sec... – Mikel – 2011-03-04T03:50:25.367
brilliant! thank you. Sorry my inability to explain my request resulted in two questions. again, Thanks! – user68782 – 2011-03-04T05:12:31.240
As tmux changes its window title on a whim, this can very quickly be overwritten by normal changes to the window title by tmux. – UtahJarhead – 2012-10-08T18:43:26.853