在窗口中打开新窗格会重置窗口名称。

huangapple go评论49阅读模式
英文:

Opening a new pane in a window resets window name

问题

每当我在命名的窗口内打开一个新的窗格,它会重置该窗口的名称。这使得命名无法使用。我该如何解决这个问题/我做错了什么?

比如我将一个窗口重命名如下:

在窗口中打开新窗格会重置窗口名称。

然后我会得到:

在窗口中打开新窗格会重置窗口名称。

但是,只要我打开一个额外的窗格,它就会重置窗口名称:

在窗口中打开新窗格会重置窗口名称。

英文:

Whenever I open a new pane inside a named window, it resets the name of that window. This makes the naming unusable. How do I solve this/what am I doing wrong?

Say I renamed a window like so:

在窗口中打开新窗格会重置窗口名称。

I then have:

在窗口中打开新窗格会重置窗口名称。

But as soon as I open an additional pane it resets the window name:

在窗口中打开新窗格会重置窗口名称。

答案1

得分: 1

你的shell或终端中有自动发出窗口重命名命令给tmux,可以是通过 tmux rename-window '...' 或转义序列 printf '\ek...\e\\' 完成的。

虽然可以轻松地在配置文件中搜索 rename-window 模式,但对于转义序列来说并不容易,因为它们可以用多种方式表示。

至少你可以通过禁用 allow-rename 选项来阻止通过转义序列重命名窗口:

tmux set-option -wg allow-rename off

如果这有效果,那么现在你有线索了:检查你的shell配置或终端首选项。

英文:

Something in your shell or terminal is automatically issuing a window rename command to tmux, either via tmux rename-window '...' or an escape sequence printf '\ek...\e\\'.

While it is easy to grep your config files for rename-window patterns, the same cannot be done easily for escape sequences, because those can be represented in many ways.

At least you can forbid window rename via escape sequence by disabling allow-rename option:

tmux set-option -wg allow-rename off

If that worked, now have a clue: check you shell config or terminal preferences.

huangapple
  • 本文由 发表于 2023年6月29日 17:00:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/76579574.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定