Closed zadjii-msft closed 4 years ago
I would +1 to this. Recently working with the terminal profiles.json I was having fun with calling directly to the native windows SSH "ssh.exe user@addr" as its own profile. The ability to make a manuitem to call to a separate config as its own menu entry would be tremendous. Even supporting a nested entry of ssh x@x calls with a singular master config entry would be great.
@zadjii-msft How do we add those nested commands? Is there a commands.json
or something like that? I couldn't find it. Or is it on the settings file? If it is, I couldn't find it on schema.
Or is it not supposed to be user customizable?
@giggio If you're using a build that includes #6856, you can do something like the following:
{
"name": "Split Pane...",
"commands": [
{
"iterateOn": "profiles",
"name": "Split with ${profile.name}...",
"commands": [
{ "command": { "action": "splitPane", "profile": "${profile.name}", "split": "auto" } },
{ "command": { "action": "splitPane", "profile": "${profile.name}", "split": "vertical" } },
{ "command": { "action": "splitPane", "profile": "${profile.name}", "split": "horizontal" } }
]
}
]
},
Just throw that into your keybindings
, and that should work.
Perfect, it works! I was not sure where to put it. There should be an issue to update the schema.
@giggio I'm purposely not updating the docs until we feel it's ready for general adoption 😉
The docs will probably be updated as a part of #7174
Not the docs, the schema: https://github.com/microsoft/terminal/blob/master/doc/cascadia/profiles.schema.json
Sorry, in my head, the schema is part of the docs. I get how that's confusing 😛
:tada:This issue was addressed in #6856, which has now been successfully released as Windows Terminal Preview v1.3.2382.0
.:tada:
Handy links:
The initial design of the command palette only covers singular commands, but includes a follow-up to support nesting commands. This way, all the commands don't appear in the menu straight away. Instead, the user must first select the parent command, to be given the sub-list.
We should support this.