Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gilly3 opened this issue Oct 16, 2024 · 6 comments · May be fixed by #811
Open

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

gilly3 opened this issue Oct 16, 2024 · 6 comments · May be fixed by #811
Assignees

Comments

@gilly3
Copy link

gilly3 commented Oct 16, 2024

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
Copy link
Collaborator

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
Copy link
Contributor

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
Copy link
Collaborator

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

@mattwojo
Copy link
Collaborator

@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
Copy link
Contributor

DHowett commented Oct 28, 2024

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants