Always open in a new tab #21531

Closed
opened 2026-01-31 07:47:19 +00:00 by claunia · 3 comments
Owner

Originally created by @mattm3 on GitHub (Apr 15, 2024).

Description of the new feature/enhancement

I'm not sure if this is already possible but is it possible or can it be implemented that tabs are always used. I have it set so the terminal opens in Powershell 7 as admin but if I am in command prompt and want to open a new tab it always opens in a new window. I have tried playing with a number of settings but haven't been successful in making it always open in a new tab no matter what.

Proposed technical implementation details (optional)

Originally created by @mattm3 on GitHub (Apr 15, 2024). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement I'm not sure if this is already possible but is it possible or can it be implemented that tabs are always used. I have it set so the terminal opens in Powershell 7 as admin but if I am in command prompt and want to open a new tab it always opens in a new window. I have tried playing with a number of settings but haven't been successful in making it always open in a new tab no matter what. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 07:47:19 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Apr 15, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (Apr 15, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [Feature Request (default type tab) (#1922)](https://github.com/microsoft/terminal/issues/1922), similarity score: 0.80 - [Open a new tab when I run wt (#7818)](https://github.com/microsoft/terminal/issues/7818), similarity score: 0.80 - [How to make "Open in Windows Terminal" open new tab in the existing Windows Terminal window rather than a new window? (#7991)](https://github.com/microsoft/terminal/issues/7991), similarity score: 0.80 - [Contextual menu Open with Windows Terminal should open in a new tab (#11560)](https://github.com/microsoft/terminal/issues/11560), similarity score: 0.79 - [Open new tab elevated in same window with other tabs not elevated (#4014)](https://github.com/microsoft/terminal/issues/4014), similarity score: 0.78 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@zadjii-msft commented on GitHub (Apr 15, 2024):

Okay I'm gonna try and read between the lines here:

  • your default profile is PowerShell 7
  • You've set your PowerShell 7 profile to "elevate": true (in the settings UI, this is "Run this profile as administrator")
  • you open the Terminal (unelevated) and run CMD
  • From that unelevated window, you open a new tab.
    • That uses the default profile, PowerShell 7
    • That opens a new, elevated window

Is that about right? Elevated and unelevated tabs can't coexist in the same Terminal window (as of writing, circa <=1.21). Either all the tabs are unelevated, or all are elevated.

Now, with the upcoming Windows 11 release with Sudo for Windows, you could probably change your default profile from pwsh.exe and elevate:true to just sudo.exe pwsh.exe, and then just run the Terminal unelevated all the time.

Overall, I'd recommend against having your default profile be elevate:true. There's kinda a lot of awkward edge cases with the default profile always wanting to run in an elevated window - this is just one of them

@zadjii-msft commented on GitHub (Apr 15, 2024): Okay I'm gonna try and read between the lines here: * your default profile is PowerShell 7 * You've set your PowerShell 7 profile to `"elevate": true` (in the settings UI, this is "Run this profile as administrator") * you open the Terminal (unelevated) and run CMD * From that unelevated window, you open a new tab. * That uses the default profile, PowerShell 7 * That opens a new, elevated window Is that about right? Elevated and unelevated tabs can't coexist in the same Terminal window (as of writing, circa <=1.21). Either all the tabs are unelevated, or all are elevated. Now, with the upcoming Windows 11 release with Sudo for Windows, you could probably change your default profile from `pwsh.exe` and `elevate:true` to just `sudo.exe pwsh.exe`, and then just run the Terminal unelevated all the time. Overall, I'd recommend _against_ having your default profile be `elevate:true`. There's kinda a lot of awkward edge cases with the default profile always wanting to run in an elevated window - this is just one of them
Author
Owner

@mattm3 commented on GitHub (Apr 15, 2024):

Ah you're right, I was running CMD unelevated, I had them all set to open in admin so thought I was running all of them elevated. Changing them back to unelevated works as I want it to.

Thanks

@mattm3 commented on GitHub (Apr 15, 2024): Ah you're right, I was running CMD unelevated, I had them all set to open in admin so thought I was running all of them elevated. Changing them back to unelevated works as I want it to. Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21531