如何配置 tmux/iTerm 以在终端选项卡中将会话名称显示为标题?

And*_*rew 7 iterm tmux macos

我开始在 Mac OS X 上使用 tmux 和 iTerm2。目前,我所有的标签都标题为“tmux”(假设它只是显示进程名称),这使得很难找到我想要的标签。如何配置 tmux(或 iTerm)以在选项卡中显示我的 tmux 会话的名称?

小智 9

我通过...添加了此功能

  1. 将以下行添加到我的 .tmux.conf 以包含以下行

set-option -g set-titles on

  1. 使用 -s 开关启动我的 tmux 会话

tmux new-session -s session_name

我还没有想出如何从会话中设置标题,但应该是可能的。希望有帮助!

来源网址:

从 tmux 中重命名 Iterm2 选项卡

https://gist.github.com/henrik/1967800