Skip to content

Extension: Ask for parameter for profile #8339

@bakutheleo

Description

@bakutheleo

Description of the new feature/enhancement

I often have the need for multiple, but similar tabs. For example, an SSH terminal to various servers. Currently, afaik, I must create a new profile for each that specifies the specific server I want to connect to. This is not generally practical, as I have a large number of servers and may need to connect to any of them at any time. Currently I have to edit the profile entry in the config file with the new server name--thankfully that is read immediately so I can then use that profile, but this is still cumbersome.

Proposed technical implementation details (optional)

I would like to be able to specify a variable name in a profile that would request the value when I open that profile. For example, current a static entry for an ssh profile would be:

"commandline": "ssh user@servername"

It would be useful to be able to have a parameter so the value were requested from the user:

"commandline": "ssh user@%Server name%"

or multiple parameters:

"commandline": "ssh %user%@%Server name%"

When this profile is activated wt would ask the user for each parameter. This way I could have one profile that could handle whatever machine I want to connect to. Every time I open a new tab using this profile it would ask for the parameters to use in that tab. In my first example it would raise a dialog requesting Server name where I would enter the name of the server I want to connect to. In the second example it would also ask for the user. Of course this could be used for any purpose or other value.

I further suggest that if the same parameter name is used more than once it would only ask once, but use that for each reference. This would allow, for example, to use that parameter in the tab name:

"name": "SSS (%Server name%)",
"commandline": "ssh user@%Server name%"

In this example wt would ask for the value of "Server name" once, then use it in the tab title as well as the connection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-ExtensibilityA feature that would ideally be fulfilled by us having an extension model.Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions