Table of Contents
- 1. PROMPT_COMMAND
- 2. tmux 2.7 does not change window name by default
- 3. set-option -g allow-rename on
1 PROMPT_COMMAND
If you set PROMPT_COMMAND, tmux and screen will change window name dynamically.
This is useful for connecting multiple machine via SSH.
- Changing current directory with cd will change window name.
- If PROMPT_COMMAND is set on machine connected via SSH, window name will be changed to hostname of machine connected via SSH.
$ cat ~/.bashrc<snip>case ${TERM} in screen*) export PROMPT_COMMAND=’printf “