4 ms·
sshing into a server only happens within one shell. Thus you can open tmux there and that's the only level of granularity you can have. iterm window->iterm tab
by lanza 3y ago
sshing into a server only happens within one shell. Thus you can open tmux there and that's the only level of granularity you can have.
iterm window->iterm tab->ssh->tmux windows->tmux panes
With `tmux -CC` it lets you hoist that chain upwards and map the entire ssh session into an iterm window.
iterm window (ssh session) -> iterm tabs (tmux windows)
The biggest benefit for me is that you can then open another tmux session within the CC one and use tmux as normal
iterm window (ssh session) -> iterm tabs (tmux windows) -> tmux2 windows -> tmux2 panes
And then the normal feature of tmux is that it persists across ssh sessions. This also means that the entire iTerm2 window and all its tabs and splits are also maintained across sessions. I think my current layout on my main development machine that I remote into is over 3 months old.
Another point of view is that it decouples the state of your tmux tabs/panes from your terminal emulator itself. e.g. if you use this locally instead you could then terminate the entire iterm program and reopen it and restore the same exact window/tab/pane splits you previously had. This is a nice perk for restarting/updating iTerm.
- jordemort 3y ago> f you use this locally instead you could then terminate the entire iterm program and reopen it and restore the same exact window/tab/pane splits you previously had. This is a nice perk for restarting/updating iTerm. iTerm seems to be able to pull this off itself during upgrades, even without tmux. The first time it happened, I was surprised, and now I just install iTerm updates with abandon, knowing that all my 40 terminal windows and all the stuff in them will come back after the update.
- riddley 3y agoI appreciate your explanation, but I'll confess that I still don't get it. I assume I'm just not understanding; please don't take offense. The state of my splits etc are already distinct from the terminal emulator as is/are the session(s) without CC. I can restart my terminal emulator or add new sessions at will without needing any special support from the terminal.