-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add a shortcut action for executing multiple ShortcutActions #5970
Comments
[Needs-MiniSpec] |
This will be part of Command Palette (#5400), I bet? |
@zadjii-msft does this allow for mapping a key binding to a set of key input, as noted in #3799? |
@damnskippy Nah, the two issues are pretty atomic. This issue is more along the lines of "I want to press one keybinding and open a new tab, and split that tab into a bunch of panes, and open a couple other tabs, all at once". Theoretically, the two combined could be "open a tab, and send a bunch of input to it, then open another pane, and send input to that one too" |
@zadjii-msft this feature is ❤️ - in ConEmu, I have a jumplist task to open multiple shell tabs at once. If I understand this issue correctly, until this feature is implemented, that's not possible in terminal today (even if not from the jumplist)? |
Just a thought, what if we did it like this: {
"action": [
{ "action": "newTab", "profile": "Ubuntu" },
{ "action": "splitPane", "split":"auto", "splitMode": "duplicate" },
],
"keys": []
} Just override |
If
|
Sure, why not? That wouldn't break anything, right? It's just inefficient? |
…A KEYBINDING (#6537) ## Summary of the Pull Request Adds a execute commandline action (`wt`), which lets a user bind a key to a specific `wt` commandline. This commandline will get parsed and run _in the current window_. ## References * Related to #4472 * Related to #5400 - I need this for the commandline mode of the Command Palette * Related to #5970 ## PR Checklist * [x] Closes oh, there's not actually an issue for this. * [x] I work here * [x] Tests added/passed * [ ] Requires documentation to be updated - yes it does ## Detailed Description of the Pull Request / Additional comments One important part of this change concerns how panes are initialized at runtime. We've had some persistent trouble with initializing multiple panes, because they rely on knowing how big they'll actually be, to be able to determine if they can split again. We previously worked around this by ignoring the size check when we were in "startup", processing an initial commandline. This PR however requires us to be able to know the initial size of a pane at runtime, but before the parents have necessarily been added to the tree, or had their renderer's set up. This led to the development of `Pane::PreCalculateCanSplit`, which is very highly similar to `Pane::PreCalculateAutoSplit`. This method attempts to figure out how big a pane _will_ take, before the parent has necessarily laid out. This also involves a small change to `TermControl`, because if its renderer hasn't been set up yet, it'll always think the font is `{0, fontHeight}`, which will let the Terminal keep splitting in the x direction. This change also makes the TermControl set up a renderer to get the real font size when it hasn't yet been initialized. ## Validation Steps Performed This was what the json blob I was using for testing evolved into ```json { "command": { "action":"wt", "commandline": "new-tab cmd.exe /k #work 15 ; split-pane cmd.exe /k #work 15 ; split-pane cmd.exe /k media-commandline ; new-tab powershell dev\\symbols.ps1 ; new-tab -p \"Ubuntu\" ; new-tab -p \"haunter.gif\" ; focus-tab -t 0", }, "keys": ["ctrl+shift+n"] } ``` I also added some tests. # TODO * [x] Creating a `{ "command": "wt" }` action without a commandline will spawn a new `wt.exe` process? - Probably should just do nothing for the empty string
Oh my god this is a /dup #3992 |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Dispatch a whole bunch of commands all at once.
We could probably use the same machinery we use for commandline args for this.
The text was updated successfully, but these errors were encountered: