Tmux window title keeps renaming

喜夏-厌秋 提交于 2019-12-03 02:49:51

Check whether your PS1 (plus PS2, PS3 or PS4 if those are set) is changing the title:

printf %q "$PS1" | grep -F '\\033'

Add the following to your tmux config file:

set-option -g allow-rename off

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 .

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!