MicrosoftDocs / terminal

Creative Commons Attribution 4.0 International
472 stars 180 forks source link

"not yet capable of opening new tabs" per command line arguments documentation #805

Open gilly3 opened 2 weeks ago

gilly3 commented 2 weeks ago

Type of issue

Other (describe below)

Feedback

According to the note at the end of the "Open a new profile instance" section of the command line arguments documentation, it is not possible to open a new tab:

The -p flag is used to specify the Windows Terminal profile that should be opened. Substitute "Ubuntu-18.04" with the name of any terminal profile that you have installed. This will always open a new window. Windows Terminal is not yet capable of opening new tabs or panes in an existing instance.

I assume this is an oversight in the documentation, since wt nt exists, unless there is some nuance I am missing?

Page URL

https://learn.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows#open-a-new-profile-instance

Content source URL

https://github.com/MicrosoftDocs/terminal/blob/main/TerminalDocs/command-line-arguments.md#open-a-new-profile-instance

Author

nguyen-dows

Document Id

bd211ca4-58c5-fdb6-93c4-75b3ea7aa34f

mattwojo commented 4 days ago

Hey @gilly3 - Sounds like this is a semantics issue. This sentence is pointing out that a new tab can't be opened in an existing instance of an already open Terminal. As you point out, wt nt will open a new instance with a new Terminal tab.

zadjii-msft commented 4 days ago

You know, I'm gonna reactivate this. We should just remove

Windows Terminal is not yet capable of opening new tabs or panes in an existing instance.

because it totally is possible to open new tabs in existing windows (via wt -w ...)

mattwojo commented 3 days ago

Thanks @zadjii-msft. Wasn't aware of this change - I'll get this update in the doc.

mattwojo commented 3 days ago

@zadjii-msft When I try wt -w 0 "Command Prompt (or any number), I get a new tab opened in the existing terminal window, but with error 2147942402 (0x80070002)... am I doing something wrong? I'm running version 1.21.2911.0

DHowett commented 3 days ago

Ah, that's an intricacy of Terminal's interaction model.

If you are launching a profile (combined color scheme, title, command, other settings pertaining to how it interacts with the console session, etc.), you use wt [other args] -p "Profile Name".

If you're launching an executable (cmd.exe, powershell.exe), you use wt [other args] executable.

In your case, you'll want either wt -w 0 -p "Command Prompt" or wt -w 0 cmd.

mattwojo commented 3 days ago

Ahhhh! Thanks @DHowett! I'll get this in the doc.