The VSCode Shell Command extension aims to add some useful shell integrations.
Argument | Description |
---|---|
cmd |
Command to be executed by a shell. |
args |
Additional command line arguments. |
capture |
Output stream to be captured. Can be set to stdout or stderr . If not set, stdout is captured. |
quickPick |
Whether a QuickPick should be displayed to select a specific line of the command output . Can be set to true or false . If not set, a QuickPick will be displayed if the command outputs more than one line. |
cwd |
Current working directory. If not set, the project root directory is used. |
env |
Dictionary of environment variables. |
timeout |
Timeout in milliseconds. Default is 10s. |
Additionally, all options defined in CommonOptions
can be set.
{
"version": "2.0.0",
"tasks": [
{
"label": "Shell Command: Task Input Example",
"type": "shell",
"isBackground": false,
"command": "echo '${input:example}'"
}
],
"inputs": [
{
"type": "command",
"id": "example",
"command": "shell-command.run",
"args": {
"cmd": "ls",
"args": [
"-1",
],
"env": {
"SOME_ENV_VAR": "SOME_ENV_VAR_VALUE",
"ANOTHER_ENV_VAR": "ANOTHER_ENV_VAR_VALUE"
},
"cwd": "/",
"capture": "stdout",
"quickPick": "true"
},
}
]
}