Thank you for this project. I am learning to use Gas Town on Windows and found gastownhall/gastown#3538, where the author notes that psmux’s tmux protocol compatibility is insufficient for Gas Town’s session management. Gas Town runs tmux-oriented tests; failures can come from an incompatible or incomplete tmux implementation, behavioral differences, or missing features. For psmux, I believe the last case applies. I’m opening this issue to track the work and link a future pull request.
Summary
psmux new-session accepts the -e flag in the same way as tmux’s getopt-style CLI (the next argument is consumed as the value). Today that value is not applied: it is only skipped so scripts that pass -e VARIABLE=value do not mis-parse the following arguments (e.g. session name or shell command). Session environment from -e is not implemented yet.
I believe skipping the value was a compatibility measure: recognize the flag and consume its argument so users and scripts do not break, without implementing full session-env plumbing at the time. See #21
Expected behavior (tmux)
Per tmux, -e takes the form VARIABLE=value and may appear multiple times. Each pair should set an environment variable for the newly created session (session environment inherited by panes), analogous to tmux’s semantics for new-session -e.
Actual behavior
The parser advances past -e and its value so argv stays aligned with tmux-style invocations.
The VARIABLE=value string is discarded; nothing is forwarded into session/pane environment setup.
Scope / related entry points
The same “skip value” pattern exists in more than one place (top-level CLI new-session, nested new-session from inside a session, etc.). Implementing the feature should collect assignments, thread them through the internal server spawn path, and merge into the same session environment store used for set-environment / pane spawns.
Acceptance criteria (suggestion)
psmux new-session -e FOO=bar ... results in FOO being part of session environment for new panes (and visible where session env is exposed, e.g. format expansion / show-environment behavior as appropriate).
- Invalid VARIABLE=value forms produce a clear error instead of silently dropping data.
Thank you for this project. I am learning to use Gas Town on Windows and found gastownhall/gastown#3538, where the author notes that psmux’s tmux protocol compatibility is insufficient for Gas Town’s session management. Gas Town runs tmux-oriented tests; failures can come from an incompatible or incomplete tmux implementation, behavioral differences, or missing features. For psmux, I believe the last case applies. I’m opening this issue to track the work and link a future pull request.
Summary
psmux new-session accepts the -e flag in the same way as tmux’s getopt-style CLI (the next argument is consumed as the value). Today that value is not applied: it is only skipped so scripts that pass -e VARIABLE=value do not mis-parse the following arguments (e.g. session name or shell command). Session environment from -e is not implemented yet.
I believe skipping the value was a compatibility measure: recognize the flag and consume its argument so users and scripts do not break, without implementing full session-env plumbing at the time. See #21
Expected behavior (tmux)
Per tmux, -e takes the form VARIABLE=value and may appear multiple times. Each pair should set an environment variable for the newly created session (session environment inherited by panes), analogous to tmux’s semantics for new-session -e.
Actual behavior
The parser advances past -e and its value so argv stays aligned with tmux-style invocations.
The VARIABLE=value string is discarded; nothing is forwarded into session/pane environment setup.
Scope / related entry points
The same “skip value” pattern exists in more than one place (top-level CLI new-session, nested new-session from inside a session, etc.). Implementing the feature should collect assignments, thread them through the internal server spawn path, and merge into the same session environment store used for set-environment / pane spawns.
Acceptance criteria (suggestion)
psmux new-session -e FOO=bar ...results in FOO being part of session environment for new panes (and visible where session env is exposed, e.g. format expansion /show-environmentbehavior as appropriate).