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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 04:08:08  来源:igfitidea点击:

Keep the window's name fixed in tmux

linuxtmux

提问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 .bashrcor .zshrcseems 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 offin your .tmux.conffile

如对主要帖子的评论所示: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 中设置第二个它对我有用。