Launch sessions in a tmux split when running inside tmux#226
Open
jongio wants to merge 1 commit into
Open
Conversation
Pane launch mode previously only worked in Windows Terminal. When dispatch runs inside a tmux session (TMUX is set), pane mode now routes through 'tmux split-window' so macOS and Linux users get a split in their current tmux window instead of a new terminal. - Maps pane direction to tmux flags: right/left to -h, down/up to -v. - Sets the working directory with -c and runs the resume command. - Falls back to the existing behavior when not inside tmux. Closes #219 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes pane launch mode work inside tmux on macOS and Linux. Previously
e(split pane) only did anything in Windows Terminal; a tmux user on mac or Linux got a brand-new terminal window instead of a split.Behavior
TMUXenvironment variable is set, pane launches route throughtmux split-windowin the current tmux window.right/leftuse-h(pane to the right),down/upuse-v(pane below),autolets tmux choose.-c) and runs the resume command in the user's shell.Changes
internal/platform/shell.go:insideTmux,buildTmuxSplitArgs, andlaunchTmuxPanehelpers;platformLaunchSessionroutes pane mode to tmux when inside a tmux session.Closes #219