Compatibility gaps: Gas Town tmux argv vs psmux
Context: Gas Town invokes tmux with a specific set of subcommands and flags. These were, derived from gastown's internal/tmux/tmux.go. This issue summarizes where psmux diverges so we can track parity work.
Scope: Flags and argv shapes Gas Town actually passes—not the full tmux manual.
I expect this issue will be broken down into smaller issues and addressed by area. I have also started a discussion #210
Executive summary
Several Gas Town call sites are not handled the same way in psmux. The worst gaps are list-sessions (CLI ignores -F/-f), list-panes -s (server treats -s like “all panes”), resize-window (CLI no-op), list-keys (filters ignored), and CLI parsing for display-message -d and send-keys -X (server may support some of these; CLI does not forward them correctly).
Gap checklist
| Status |
Area |
Gas Town expectation |
psmux today |
Severity |
|
list-sessions |
-F format; sometimes -f filter |
CLI scans ~/.psmux ports—ignores -F/-f. Server path has partial -F behavior; no -f filter like tmux |
High |
|
list-panes |
-s -t session -F (session-scoped list) |
Server: -s is grouped with -a as “all panes” |
High |
|
resize-window |
-t, -x (width) |
CLI: unconditional no-op (no forward to server) |
High |
|
list-keys |
-T table + optional key (tests) |
CLI sends bare list-keys; server does not filter by argv |
High |
|
display-message |
-t, -d ms, message (no -p) |
Server skips -d + value; CLI folds -d into message text |
Medium |
|
send-keys |
-t, -l, -X + command |
Server has -X; CLI does not parse -X as a flag |
Medium |
|
respawn-pane |
-k, -t; optional -c workdir |
CLI omits -c |
Low |
|
show-options |
-gv (global value) |
Combined token -gv may not set “value only” if server expects separate -v |
Low |
|
set-option / setw |
-wt, -w/-t, -u, etc. |
Positional parsing may not match all tmux orderings |
Low |
Details (by command)
list-sessions
- Expected:
list-sessions -F '<format>'; filtered checks with -F and -f.
- Gap: The standalone
psmux list-sessions CLI path lists sessions from port files and does not apply -F or -f. Filtering comparable to tmux is not implemented end-to-end.
list-panes
- Expected: Session listing uses
-s, -t, session name, and -F
- Gap: In
src/server/connection.rs, -s is treated like -a for “all panes,” which breaks session-scoped Gas Town usage.
resize-window
- Expected:
-t, -x (width).
- Gap:
src/main.rs handles resize-window as a no-op and does not forward flags to the server.
list-keys
- Expected: e.g.
list-keys -T prefix <key> in tests.
- Gap: CLI drops arguments; server listing does not narrow by
-T/key from argv.
display-message (CLI)
- Expected:
-t, -d (milliseconds), message—without -p.
- Gap: CLI parser does not consume
-d and its value the way the server does; duration can end up in the message.
send-keys (CLI)
- Expected:
-X plus a key/command name (e.g. copy-mode).
- Gap: Server supports
-X; CLI does not treat -X as a flag and can mis-encode the command line.
respawn-pane
- Expected: Optional
-c workdir (non-Windows in upstream tmux usage).
- Gap: CLI parser does not forward
-c.
show-options
- Expected:
show-options -gv <option> (combined short options as in tmux).
- Gap: If argv uses a single
-gv token, behavior should be verified against servers that test *a == "-v" only.
set-option / set-window-option
- Expected: Multiple shapes including
-wt, window targets, unset -u.
- Gap: Complex tmux argv orderings may not round-trip; worth validating against Gas Town call sites.
Items that look broadly OK (for this doc)
capture-pane: -p, -t, -S present in CLI.
new-session: -d, -s, -c, repeated -e parsed in new-session path.
split-window: -t, -d, trailing command handled.
bind-key / unbind-key: Full argv forwarded as a command string (server must still interpret -T / tables correctly—spot-check if issues remain).
kill-server, has-session, switch-client, set-environment, show-environment, set-hook, clear-history, kill-session: Generally present; edge cases may still differ from tmux.
Suggested next steps
- Fix
list-panes semantics for -s vs -a (session-scoped vs all).
- Implement or forward
list-sessions -F/-f for the CLI path (or document that external tools must use control mode / server).
- Implement
resize-window forwarding or document intentional no-op.
- Plumb
list-keys -T and optional key through CLI and server.
- Align CLI parsers for
display-message and send-keys with server behavior (-d, -X).
References
src/main.rs — CLI parsing and forwarding
src/server/connection.rs — server command dispatch
cc: @ghbaud
Compatibility gaps: Gas Town
tmuxargv vs psmuxContext: Gas Town invokes
tmuxwith a specific set of subcommands and flags. These were, derived from gastown'sinternal/tmux/tmux.go. This issue summarizes where psmux diverges so we can track parity work.Scope: Flags and argv shapes Gas Town actually passes—not the full tmux manual.
I expect this issue will be broken down into smaller issues and addressed by area. I have also started a discussion #210
Executive summary
Several Gas Town call sites are not handled the same way in psmux. The worst gaps are
list-sessions(CLI ignores-F/-f),list-panes -s(server treats-slike “all panes”),resize-window(CLI no-op),list-keys(filters ignored), and CLI parsing fordisplay-message -dandsend-keys -X(server may support some of these; CLI does not forward them correctly).Gap checklist
list-sessions-Fformat; sometimes-ffilter~/.psmuxports—ignores-F/-f. Server path has partial-Fbehavior; no-ffilter like tmuxlist-panes-s -t session -F(session-scoped list)-sis grouped with-aas “all panes”resize-window-t,-x(width)list-keys-Ttable + optional key (tests)list-keys; server does not filter by argvdisplay-message-t,-dms, message (no-p)-d+ value; CLI folds-dinto message textsend-keys-t,-l,-X+ command-X; CLI does not parse-Xas a flagrespawn-pane-k,-t; optional-cworkdir-cshow-options-gv(global value)-gvmay not set “value only” if server expects separate-vset-option/setw-wt,-w/-t,-u, etc.Details (by command)
list-sessionslist-sessions -F '<format>'; filtered checks with-Fand-f.psmux list-sessionsCLI path lists sessions from port files and does not apply-For-f. Filtering comparable to tmux is not implemented end-to-end.list-panes-s,-t, session name, and-Fsrc/server/connection.rs,-sis treated like-afor “all panes,” which breaks session-scoped Gas Town usage.resize-window-t,-x(width).src/main.rshandlesresize-windowas a no-op and does not forward flags to the server.list-keyslist-keys -T prefix <key>in tests.-T/key from argv.display-message(CLI)-t,-d(milliseconds), message—without-p.-dand its value the way the server does; duration can end up in the message.send-keys(CLI)-Xplus a key/command name (e.g. copy-mode).-X; CLI does not treat-Xas a flag and can mis-encode the command line.respawn-pane-cworkdir (non-Windows in upstream tmux usage).-c.show-optionsshow-options -gv <option>(combined short options as in tmux).-gvtoken, behavior should be verified against servers that test*a == "-v"only.set-option/set-window-option-wt, window targets, unset-u.Items that look broadly OK (for this doc)
capture-pane:-p,-t,-Spresent in CLI.new-session:-d,-s,-c, repeated-eparsed innew-sessionpath.split-window:-t,-d, trailing command handled.bind-key/unbind-key: Full argv forwarded as a command string (server must still interpret-T/ tables correctly—spot-check if issues remain).kill-server,has-session,switch-client,set-environment,show-environment,set-hook,clear-history,kill-session: Generally present; edge cases may still differ from tmux.Suggested next steps
list-panessemantics for-svs-a(session-scoped vs all).list-sessions -F/-ffor the CLI path (or document that external tools must use control mode / server).resize-windowforwarding or document intentional no-op.list-keys-Tand optional key through CLI and server.display-messageandsend-keyswith server behavior (-d,-X).References
src/main.rs— CLI parsing and forwardingsrc/server/connection.rs— server command dispatchcc: @ghbaud