tmux/Q/What expands every item in tree mode, and why does Cmd-plus resize the Ghostty font instead?
What expands every item in tmux tree mode, and why does Cmd-plus resize the Ghostty font instead?
AI Answer
- Short answer: tmux/Mode/Tree binds expand-all to
M-+, andM-is Key/Meta — on macOS that is⌥, never⌘.⌘+is Ghostty's own font-size binding and is swallowed before tmux can see it. Even the right keystroke only opens the tree as deep as it was built, so after tmux/Prefixwit does nothing. Opening the tree withchoose-tree -Zshows sessions, windows, and panes at once. The keystroke that needs nothing configured
C-b :opens the tmux/Command/Prompt; typechoose-tree -Zand pressEnter.- With neither
-snor-w, tmux/Command/choose-tree builds the tree down to panes and starts every branch open, so there is nothing left to expand. ⌥⇧=—⌥and the+key — isM-+and does reach tmux, as long as the tree was opened with tmux/Prefixs.
Why ⌘+ never arrives
ghostty +list-keybindsreportskeybind = super++=increase_font_size:1andkeybind = super+==increase_font_size:1. Ghostty acts on those itself and writes nothing to the pty, so tmux is never offered the keystroke.⌘is not a terminal modifier at all — see Key/Mac/Command. Terminal programs receive Key/Control and Key/Meta, never Command.- Key/Meta on macOS is
⌥, and only when the terminal is told to send it that way.macos-option-as-alt = truein the Ghostty config makes⌥⇧=sendESCthen+, which tmux reads asM-+. Ghostty ships no built-inalt+binding for+or=, so nothing intercepts it on the way through — unlikealt+arrow_leftandalt+arrow_right, which do collide (see tmux/Keyshort/Pane/Resize Pane).
How far
M-+actually reachesTree opened with What M-+doeschoose-tree -Zs(tmux/Prefixs)opens the sessions to show their windows; panes stay hidden choose-tree -Zw(tmux/Prefixw)nothing — sessions are already open, and windows never open this way choose-tree -Z(no-s, no-w)the tree is already fully open; M--thenM-+restores it- Pressing
M-+again does not descend another level; the expansion is bounded by how the tree was built, not by how many times the key is pressed. - After tmux/Prefix
w, panes are reached one window at a time with+, Key/Arrow/Right, orl.
The durable change
bind-key W choose-tree -Zin the tmux/Config puts a fully expanded tree onC-b W.- The tree-mode keys themselves cannot be rebound off Key/Meta:
tmux list-keys -T choose-treeanswerstable choose-tree doesn't exist, and tmux/list-keys shows only theprefix,root,copy-mode, andcopy-mode-vitables. Tree-mode keys are compiled in. - No Ghostty change is called for.
macos-option-as-alt = trueis already delivering Key/Meta; unbindingsuper++would cost font-size control and still would not help, because tmux is waiting on⌥, not⌘.
Where the key list comes from
C-horF1inside tree mode prints the table that tmux/session/Picker/Help mirrors, and tmux/man repeats it underchoose-tree. Both listM-+as Expand all without qualifying the depth.
- Behaviour above is tmux/v/3.7b.
- Short answer: tmux/Mode/Tree binds expand-all to