我想在重命名后保持窗口的名称固定。但是当我重命名它之后,当我执行命令时它们不断变化。
如何将它们保留为静态名称?
如主帖评论所示:
set-option -g allow-rename off
在您的.tmux.conf
文件中
.bashrc
或 .zshrc
文件并添加此行export DISABLE_AUTO_TITLE=true
~/.tmux.conf
文件set-option -g allow-rename off
这可以在 tmux 中完成,按
Ctrl+B
,然后按 :
调出命令提示符,然后输入:
:source-file ~/.tmux.conf
或者简单地从 shell 中:
$ tmux source-file ~/.tmux.conf
# set-window-option -g automatic-rename off
set-option -g allow-rename off
在 ~/.tmux.conf 中注释第一个,并设置第二个,它对我有用。
在我的.zshrc文件中,添加以下配置,它解决了这个问题。
DISABLE_AUTO_TITLE=true