Suddenly, both my screen/tmux started changing my windows\' names after every command. They keep changing the name to the value of $PROMPT_COMMAND
on every single a
First, if l0b0's answer fixed your problem could you please mark it as a solution? Second, for those of use who stumble upon this question and are using fedora 19 this redhat bug report may be of interest. It seems like the default value of $PROMPT_COMMAND set by /etc/bashrc has been changed recently. I reverted to the previous behavior like this:
echo 'printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"' > /etc/sysconfig/bash-prompt-screen
chmod a+rx /etc/sysconfig/bash-prompt-screen
Add the following to your tmux config file:
set-option -g allow-rename off
Check whether your PS1
(plus PS2
, PS3
or PS4
if those are set) is changing the title:
printf %q "$PS1" | grep -F '\\033'
put this in the end of the .tmux.conf file.
set-window-option -g automatic-rename off
set-option -g allow-rename off
then reload the tmux config file. This works for me .