0

I'm using tmux iterm2 integration, and I want to display the "tab title" on iterm2 status bar. My idea is to use the interpolated string corresponding to this "tab title" in the status bar configuration, but I cannot find such a variable in iterms2 wiki page.

enter image description here

The reason is that when I do split pane, I still want to display this tab title on the status bar, rather than the session name which is automatically reset. I tried (name), which is the session name, but the status bar changes when I split pane. I also tried (title), but nothing is displayed in the status bar. It may have something to do with that I didn't successfully set a tmux title, but I don't know how to set tmux title in this integration since the prefix (e.g. Ctrl + b) no longer works.

Helen
  • 63
  • 1
  • 7

1 Answers1

1

\(tab.title) solves the problem!

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Helen
  • 63
  • 1
  • 7
  • See "[Explaining entirely code-based answers](https://meta.stackoverflow.com/q/392712/128421)". While this might be technically correct it doesn't explain why it solves the problem or should be the selected answer. We should educate in addition to help solve the problem. – the Tin Man Jan 20 '20 at 21:51
  • That's a funny comment. As I mentioned in the question, \(title) doesn't work, which is the variable described in iTerm2 official variables page. But \(tab.title) works, which simply suggests that you should add the type before the variable. – Helen Feb 19 '20 at 11:43