Skip to content

wt new-tab open near current tab #14687

@KalleOlaviNiemitalo

Description

@KalleOlaviNiemitalo

Description of the new feature/enhancement

I have a Bash function that opens a tab with PowerShell in the current directory:

vspwsh ()
{
    wt new-tab --profile "Developer PowerShell for VS 2017" --startingDirectory .
}

I'd like this to place the new PowerShell tab next to the Bash tab in which I run the command. That way, it would be easier for me to keep track of the purpose of each tab, keeping tabs near each other when they are for working on the same directory.

This is somewhat related to #3158 but would not depend on any escape sequences emitted by the shell.

Proposed technical implementation details (optional)

Add a --near-current-tab option to wt new-tab. When specified, use the WT_SESSION environment variable to find the session, tab, and window in which the command was run, and place the new tab near that one.

If both --near-current-tab and --window are specified, then ignore WT_SESSION and instead use the selected tab of the specified window.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Commandlinewt.exe's commandline argumentsHelp WantedWe encourage anyone to jump in on these.In-PRThis issue has a related PRIssue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.good first issueThis is a fix that might be easier for someone to do as a first contribution

    Type

    No type

    Projects

    Status

    Should be written

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions