Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Shell CommandNew to Visual Studio Code? Get it now.
Shell Command

Shell Command

mngrm3a

|
21,256 installs
| (0) | Free
Useful shell integrations for VSCode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSCode Shell Command

The VSCode Shell Command extension aims to add some useful shell integrations.

Task Input

Task Input

Configuration

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.

Example

{
  "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"
      },
    }
  ]
}

Inserting the command output into the current document

Task Input

Piping the current selection through a command

Task Input

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft