Skip to content

mngrm3a/vscode-shell-command

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published