[PR #11045] [MERGED] Add action to run multiple actions. #28375

Open
opened 2026-01-31 09:28:07 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11045
Author: @Rosefield
Created: 8/26/2021
Status: Merged
Merged: 8/31/2021
Merged by: @undefined

Base: mainHead: feature/gh3992-run-multiple-actions


📝 Commits (6)

  • 81260e8 Add action to run multiple actions.
  • a2d072a missing comma
  • 516ead4 Remove name field entirely, force user to specify a name on the comand.
  • f16efda remove name from the schema too
  • 3f9dbee Merge remote-tracking branch 'origin/main' into feature/gh3992-run-multiple-actions
  • 666050b Remove duplicate converter

📊 Changes

10 files changed (+213 additions, -44 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+19 -0)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+17 -0)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+2 -0)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.h (+31 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.cpp (+6 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.h (+49 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.idl (+8 -0)
📝 src/cascadia/TerminalSettingsModel/AllShortcutActions.h (+4 -2)
📝 src/cascadia/TerminalSettingsModel/ApplicationState.cpp (+0 -42)
📝 src/cascadia/TerminalSettingsModel/JsonUtils.h (+77 -0)

📄 Description

Summary of the Pull Request

Add a new action that can contain multiple other actions.

References

PR Checklist

  • Closes Feature Request - Adding languages (#3992)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Creates a shortcut action that allows a list of actions to be specified as arguments. Steals a bunch of the serialization code from my other pr. Overall, because I had the serialization code written already, this was remarkably easy.

I can't think of any combined action to be added to the defaults, so I think this is just a thing for the documentation unless someone else has a good example. I know there are lot of times when the recommended workaround is "make an action with commandline wt.exe ..." and this could be a good replacement for that, but that is all personalized.

I didn't add this to the command line parsing, since the command line is already a way to run multiple actions.

Validation Steps Performed

Created a new command, confirmed that "Move right->down" showed up in the command palette, and that running it did the correct behavior (moving right one pane, then down one pane).

      {
        "command": {
          "action": "multipleActions",
          "name": "Move right->down",
          "actions": [
            {"action":  "moveFocus", "direction": "right" },
            {"action":  "moveFocus", "direction": "down" },
          ]
        }
      }

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/11045 **Author:** [@Rosefield](https://github.com/Rosefield) **Created:** 8/26/2021 **Status:** ✅ Merged **Merged:** 8/31/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `feature/gh3992-run-multiple-actions` --- ### 📝 Commits (6) - [`81260e8`](https://github.com/microsoft/terminal/commit/81260e841501b03356ad5478870fd935c36b56a3) Add action to run multiple actions. - [`a2d072a`](https://github.com/microsoft/terminal/commit/a2d072a3ab2806464df60b9a4bc42c1ce8dc9dd2) missing comma - [`516ead4`](https://github.com/microsoft/terminal/commit/516ead49de383f22060b0dadd1ab98ba03739e85) Remove name field entirely, force user to specify a name on the comand. - [`f16efda`](https://github.com/microsoft/terminal/commit/f16efda8ffa0994fceb86ecc6736d73ed8759825) remove name from the schema too - [`3f9dbee`](https://github.com/microsoft/terminal/commit/3f9dbee58fa7b1e00d379b5db2d76902193954bf) Merge remote-tracking branch 'origin/main' into feature/gh3992-run-multiple-actions - [`666050b`](https://github.com/microsoft/terminal/commit/666050bd6f4954a0189d005d7d210b9d915d370e) Remove duplicate converter ### 📊 Changes **10 files changed** (+213 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+19 -0) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+17 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.h` (+31 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.cpp` (+6 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.h` (+49 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.idl` (+8 -0) 📝 `src/cascadia/TerminalSettingsModel/AllShortcutActions.h` (+4 -2) 📝 `src/cascadia/TerminalSettingsModel/ApplicationState.cpp` (+0 -42) 📝 `src/cascadia/TerminalSettingsModel/JsonUtils.h` (+77 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Add a new action that can contain multiple other actions. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #3992 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [x] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments Creates a shortcut action that allows a list of actions to be specified as arguments. Steals a bunch of the serialization code from my other pr. Overall, because I had the serialization code written already, this was remarkably easy. I can't think of any combined action to be added to the defaults, so I think this is just a thing for the documentation unless someone else has a good example. I know there are lot of times when the recommended workaround is "make an action with commandline wt.exe ..." and this could be a good replacement for that, but that is all personalized. I didn't add this to the command line parsing, since the command line is already a way to run multiple actions. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Created a new command, confirmed that "Move right->down" showed up in the command palette, and that running it did the correct behavior (moving right one pane, then down one pane). ``` { "command": { "action": "multipleActions", "name": "Move right->down", "actions": [ {"action": "moveFocus", "direction": "right" }, {"action": "moveFocus", "direction": "down" }, ] } } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:28:07 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28375