Linux 保持窗口名称在 tmux 中固定
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6041178/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Keep the window's name fixed in tmux
提问by Xiezi
I'm new to tmux. I want to keep the windows' name fixed after I rename it. But after I renaming it, they keep changing when I execute the commands.
我是 tmux 的新手。我想在重命名后保持 Windows 的名称固定。但是在我重命名后,当我执行命令时它们会不断变化。
Is there any way that I can keep them in a static name?
有什么办法可以将它们保留在静态名称中?
回答by Jean Carlo Machado
As suggested on the Super User link, setting the following variable in your .bashrc
or .zshrc
seems to solve the issue:
正如超级用户链接所建议的,在您的.bashrc
或.zshrc
似乎可以解决问题:
DISABLE_AUTO_TITLE=true
回答by preaction
As shown in a comment to the main post: set-option -g allow-rename off
in your .tmux.conf
file
如对主要帖子的评论所示:set-option -g allow-rename off
在您的.tmux.conf
文件中
回答by yixing yan
In my .zshrc file , add the following config, it solved this problem.
在我的 .zshrc 文件中,添加以下配置,它解决了这个问题。
DISABLE_AUTO_TITLE=true
回答by Vicotr
# set-window-option -g automatic-rename off
set-option -g allow-rename off
Comment the first one, and set the second one, in the ~/.tmux.conf It works for me.
注释第一个,并在 ~/.tmux.conf 中设置第二个它对我有用。