Skip to content
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

shouldRunCommands on each command capability #14

Open
rbalet opened this issue Jul 8, 2021 · 5 comments
Open

shouldRunCommands on each command capability #14

rbalet opened this issue Jul 8, 2021 · 5 comments

Comments

@rbalet
Copy link
Contributor

rbalet commented Jul 8, 2021

I would find it useful to be able to select which command to run automatically. additionally to the logic you did already implement

Example & proposal

We could control if the command does exist, if not then execute it as you always did, but if it did, then control the shouldRunCommands before executing it.

{
   "splitTerminals": [
          {
            "name": "server",
            "commands": [ 
              "npm i",
                {
                  "command":  "npm run dev",
                 "shouldRunCommands": false
               }
           ]
       }
  ]
}

Idea

commands.foreach(item => {
  if(item.command) {
    //  New logic per command
  } else {
    // like normally
  }
}
@EthanSK
Copy link
Owner

EthanSK commented Jul 14, 2021

This is already a feature that has been implemented, and is documented quite clearly? Unless I'm misunderstanding your request

@rbalet
Copy link
Contributor Author

rbalet commented Jul 20, 2021

@EthanSK If it does exist and is clearly documented, could you provide me a link?

I may have not explained myself clearly.

You can set the shouldRunCommands for an array of commands, but you can't, in the commands, choose which one of the command should be executed.

Example, I would like to

  1. Always run the npm i command
  2. Never run the npm run something

In the same terminal.

If I do understand correctly the way your extension works, you run either every command, or none of them. Or am I wrong?

@EthanSK
Copy link
Owner

EthanSK commented Jul 22, 2021

Ah I understand your request now. I could add it, but at the moment the whole extension is broken thanks to the VS Code update

@rbalet
Copy link
Contributor Author

rbalet commented Jul 27, 2021

Thx, and good luck with the fix

@illiteratealliterator
Copy link

illiteratealliterator commented Feb 12, 2022

Just installed this extension and it works great (thanks!), but I'm also looking for the feature mentioned in this issue. Maybe the existing "commands" array could be for commands that should be executed, and a "pasteCommands" array could be added for the ones that will be pasted, but not executed?
Edit: I'm actually looking for this feature so I can run a change-dir command before another (non-executed) command. This other issue would also solve it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants