fix: use correct wt.exe split-pane flags (-H/-V) instead of invalid --direction#20
Merged
jongio merged 3 commits intojongio:mainfrom Mar 21, 2026
Merged
Conversation
…-direction Windows Terminal's split-pane subcommand does not support a --direction flag. Replace --direction <value> with the correct -H (horizontal) and -V (vertical) flags in both launchWindowsSession and buildWSLWTArgs. Fixes jongio#19 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cover all pane directions (down, up, right, left, auto, empty, unknown), verify existing args are preserved, and add missing up/left/empty cases to buildWSLWTArgs test table. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio
approved these changes
Mar 21, 2026
Owner
jongio
left a comment
There was a problem hiding this comment.
Clean, focused bug fix. appendWTPaneDirFlags() correctly replaces the invalid --direction flag with -H/-V, test coverage is comprehensive (7 direction cases + base-args preservation), and the helper extraction removes duplication between the native and WSL paths.
One minor note: "up" -> -H and "left" -> -V controls split orientation only - Windows Terminal decides actual pane placement. The code comment acknowledges this ("closest available direction"), which is sufficient. Worth noting in the config docs/reference for user clarity.
Co-authored-by: Copilot <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.
Fixes #19
Windows Terminal's
split-panesubcommand does not support a--directionflag. The code was passing--direction downwhich WT didn't recognize, causing it to treatdownas the command to execute -- resulting in a 'file not found' error.Changes:
appendWTPaneDirFlags()helper to translate pane direction config values to the correctwt.exeflags (-Hfor horizontal,-Vfor vertical)launchWindowsSession()andbuildWSLWTArgs()to use the new helper