wt -w 0 sp -s 0.4 pwsh opens a new tab and THEN splits it #23176

Closed
opened 2026-01-31 08:34:27 +00:00 by claunia · 4 comments
Owner

Originally created by @daxian-dbw on GitHub (Apr 18, 2025).

Originally assigned to: @lhecker on GitHub.

Windows Terminal version

1.23.10732.0

Windows build number

10.0.26100.0

Other Software

No response

Steps to reproduce

When both WT stable and WT preview are both installed, running wt -w 0 sp -s 0.4 pwsh in WT preview will start a WT stable window (or use an existing WT stable window) and split the tab in it.

Even when using the WT preview specific wt.exe, it still doesn't work properly -- it starts a new tab in the current WT preview window and split that tab, while the expectation is that it will split the current tab.

& 'C:\Users\<user-name>\AppData\Local\Microsoft\WindowsApps\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\wt.exe' -w 0 sp -s 0.4 pwsh

The command wt -w 0 sp -s 0.4 pwsh works as expected when running in WT stable.
For reference, this behavior was reported in https://github.com/PowerShell/AIShell/issues/363

Expected Behavior

Running wt -w 0 sp -s 0.4 pwsh should split the current tab in the current WT window, regardless of in WT stable or WT preview.

Originally created by @daxian-dbw on GitHub (Apr 18, 2025). Originally assigned to: @lhecker on GitHub. ### Windows Terminal version 1.23.10732.0 ### Windows build number 10.0.26100.0 ### Other Software _No response_ ### Steps to reproduce When both WT stable and WT preview are both installed, running `wt -w 0 sp -s 0.4 pwsh` in WT preview will start a WT stable window (or use an existing WT stable window) and split the tab in it. Even when using the WT preview specific `wt.exe`, it still doesn't work properly -- it starts a new tab in the current WT preview window and split that tab, while the expectation is that it will split the current tab. > `& 'C:\Users\<user-name>\AppData\Local\Microsoft\WindowsApps\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\wt.exe' -w 0 sp -s 0.4 pwsh` The command `wt -w 0 sp -s 0.4 pwsh` works as expected when running in WT stable. For reference, this behavior was reported in https://github.com/PowerShell/AIShell/issues/363 ### Expected Behavior Running `wt -w 0 sp -s 0.4 pwsh` should split the current tab in the current WT window, regardless of in WT stable or WT preview.
Author
Owner

@daxian-dbw commented on GitHub (Apr 18, 2025):

This could be related to https://github.com/microsoft/terminal/issues/18459

@daxian-dbw commented on GitHub (Apr 18, 2025): This could be related to https://github.com/microsoft/terminal/issues/18459
Author
Owner

@DHowett commented on GitHub (Apr 23, 2025):

When both WT stable and WT preview are both installed, running wt -w 0 sp -s 0.4 pwsh in WT preview will start a WT stable window (or use an existing WT stable window) and split the tab in it.

This is expected when the setting in "Manage App Execution Aliases" gives precedence to Terminal Stable

Even when using the WT preview specific wt.exe, it still doesn't work properly -- it starts a new tab in the current WT preview window and split that tab, while the expectation is that it will split the current tab.

This is a bug. I can reproduce it on Canary as well. Thanks!

@DHowett commented on GitHub (Apr 23, 2025): > When both WT stable and WT preview are both installed, running wt -w 0 sp -s 0.4 pwsh in WT preview will start a WT stable window (or use an existing WT stable window) and split the tab in it. This is expected when the setting in "Manage App Execution Aliases" gives precedence to Terminal Stable > Even when using the WT preview specific wt.exe, it still doesn't work properly -- it starts a new tab in the current WT preview window and split that tab, while the expectation is that it will split the current tab. This is a bug. I can reproduce it on Canary as well. Thanks!
Author
Owner

@daxian-dbw commented on GitHub (Apr 23, 2025):

This is expected when the setting in "Manage App Execution Aliases" gives precedence to Terminal Stable

@DHowett My settings for "Terminal" and "Terminal Preview" are shown below. Does it give precedence to Terminal Stable or Terminal Preview?

Image

@daxian-dbw commented on GitHub (Apr 23, 2025): > This is expected when the setting in "Manage App Execution Aliases" gives precedence to Terminal Stable @DHowett My settings for "Terminal" and "Terminal Preview" are shown below. Does it give precedence to Terminal Stable or Terminal Preview? ![Image](https://github.com/user-attachments/assets/7d6db4dc-30f1-486e-86e4-1c51c31ae6d9)
Author
Owner

@DHowett commented on GitHub (Sep 3, 2025):

Bumping this one up from p3 to p2 since we're getting more hits

@DHowett commented on GitHub (Sep 3, 2025): Bumping this one up from p3 to p2 since we're getting more hits
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23176