ryuta46 / vscode-multi-command

Visual Studio Code Plugin named multi-command
MIT License
229 stars 14 forks source link

Offer bash commands possibility in config #26

Closed aymericbouzy closed 4 years ago

aymericbouzy commented 4 years ago

I would like to implement the "checkout to primary git branch and sync" workflow. I think this is a great use case for this extension.

I'm struggling with using git.checkout command because it expects arguments, but asks for some of them via user prompt ...

Ultimately, I would simply like to be able to do git checkout develop as a bash command.

Would you consider the following config syntax?

    {
      "command": "multiCommand.checkoutDevelop",
      "sequence": [
        { "bash": "git checkout develop" },
        "git.sync"
      ]
    }
ryuta46 commented 4 years ago

How about combining another extension like Command Runner?

You can define your multi command as:

        {
            "command": "multiCommand.checkoutDevelop",
            "sequence": [
              { "command": "command-runner.run", "args": {"command": "git checkout develop"} },
              "git.sync"
            ]
        }

I think it's a good idea to add bash command execution feature to multi-command extension, but I think it would be more flexible to combine it with an extension specialized for command execution.

aymericbouzy commented 4 years ago

Didn't know about that extension! Maybe consider mentioning it in the Readme for people looking to implement workflows like mine?

ryuta46 commented 4 years ago

Sounds good. I will add a description of the workflow for cases like this one to README later.