This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case "$TERM" in | |
screen) | |
export PROMPT_COMMAND='echo -ne "\033]2;${USER}@${HOSTNAME}: ${PWD}\007\033k${USER}@${HOSTNAME}\033\\"' | |
;; | |
esac |
The first part sets the terminal's window title to user@host: /working/directory
\033]2;${USER}@${HOSTNAME}: ${PWD}\007The second part set's the current tmux window title to user@host
\033k${USER}@${HOSTNAME}\033\\