wt new-tab always opens a new window #7523

Closed
opened 2026-01-31 01:06:03 +00:00 by claunia · 4 comments
Owner

Originally created by @jtnord on GitHub (Apr 21, 2020).

Originally assigned to: @zadjii-msft on GitHub.

  • wt new-tab is documented to open a new tab in an existing terminal after the first time it is run.
  • wt split-pane is documented to create a new pane in the currently focussed tab.

neither of these is correct and they always open a new window
ref #4792 / #4472

Originally created by @jtnord on GitHub (Apr 21, 2020). Originally assigned to: @zadjii-msft on GitHub. <!-- Briefly describe which document needs to be corrected and why. --> * [`wt new-tab`](https://github.com/microsoft/terminal/blob/e271599bf4fe944766eae0069390d1e8cf630ac2/doc/user-docs/UsingCommandlineArguments.md#new-tab) is documented to open a new tab in an existing terminal after the first time it is run. * [`wt split-pane`](https://github.com/microsoft/terminal/blob/e271599bf4fe944766eae0069390d1e8cf630ac2/doc/user-docs/UsingCommandlineArguments.md#split-pane) is documented to create a new pane in the currently focussed tab. neither of these is correct and they **always** open a new window ref #4792 / #4472
Author
Owner

@zadjii-msft commented on GitHub (Apr 21, 2020):

Okay sure. We should add notes that running a wt command will always result in a new window being created. The point of

Subsequent new-tab commands will all open new tabs in the same window.

was supposed to mean "Subsequent new-tab commands within a single commandline".

@zadjii-msft commented on GitHub (Apr 21, 2020): Okay sure. We should add notes that running a `wt` command will _always_ result in a new window being created. The point of > Subsequent `new-tab` commands will all open new tabs in the same window. was supposed to mean "Subsequent `new-tab` commands _within a single commandline_".
Author
Owner

@Mist-Hunter commented on GitHub (Jan 10, 2024):

"Subsequent new-tab commands within a single commandline".

Sorry to necro. But I'm confused what new-tab and split-pane do?

I can find no use case where new-tab creates a new-tab. If it type wt new-tab in any CLI environment, including an existing WT, a new window is spawned. What does Subsequent mean in this context? If I wt split-pane I will get a new window with a split-pane, which isn't what I'd expect, but is a split-pane.

wt new-tab
wt new-tab
wt new-tab

In the same window opens three new windows.

@Mist-Hunter commented on GitHub (Jan 10, 2024): > "Subsequent `new-tab` commands _within a single commandline_". Sorry to necro. But I'm confused what new-tab and split-pane do? I can find no use case where `new-tab` creates a new-tab. If it type wt new-tab in any CLI environment, including an existing WT, a new window is spawned. What does `Subsequent` mean in this context? If I `wt split-pane` I will get a new window with a split-pane, which isn't what I'd expect, but is a split-pane. ```powershell wt new-tab wt new-tab wt new-tab ``` In the same window opens three new windows.
Author
Owner

@jtnord commented on GitHub (Jan 11, 2024):

What does Subsequent mean in this context?

https://github.com/microsoft/terminal/issues/5447#issuecomment-617273543
-> was supposed to mean "Subsequent new-tab commands within a single commandline".

however wt new-tab new-tab is not valid and neither is wt new-tab split-pane split-pane (only one new-tab and split-pane) can be used.
but if you want to do this in the current window do not use wt but use the split-pane / new-tab options from the pallet
or specify the window to use with --window=0 for a new tab

@jtnord commented on GitHub (Jan 11, 2024): > What does `Subsequent` mean in this context? https://github.com/microsoft/terminal/issues/5447#issuecomment-617273543 -> was supposed to mean "Subsequent new-tab commands within a single commandline". however `wt new-tab new-tab` is not valid and neither is `wt new-tab split-pane split-pane` (only one `new-tab` and `split-pane`) can be used. but if you want to do this in the current window do not use `wt` but use the `split-pane` / `new-tab` options from the pallet or specify the window to use with `--window=0` for a new tab
Author
Owner

@Mist-Hunter commented on GitHub (Jan 11, 2024):

Thanks so much for the reply,

What does Subsequent mean in this context?

#5447 (comment) -> was supposed to mean "Subsequent new-tab commands within a single commandline".

however wt new-tab new-tab is not valid and neither is wt new-tab split-pane split-pane (only one new-tab and split-pane) can be used. but if you want to do this in the current window do not use wt but use the split-pane / new-tab options from the pallet or specify the window to use with --window=0 for a new tab

Thanks so much for the reply, I realized I was presuming how everything worked without actually looking it up. wt --window=0 new-tab achieved what I was looking for.

@Mist-Hunter commented on GitHub (Jan 11, 2024): Thanks so much for the reply, > > What does `Subsequent` mean in this context? > > [#5447 (comment)](https://github.com/microsoft/terminal/issues/5447#issuecomment-617273543) -> was supposed to mean "Subsequent new-tab commands within a single commandline". > > however `wt new-tab new-tab` is not valid and neither is `wt new-tab split-pane split-pane` (only one `new-tab` and `split-pane`) can be used. but if you want to do this in the current window do not use `wt` but use the `split-pane` / `new-tab` options from the pallet or specify the window to use with `--window=0` for a new tab Thanks so much for the reply, I realized I was presuming how everything worked without actually [looking it up](https://learn.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows). `wt --window=0 new-tab` achieved what I was looking for.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7523