seunlanlege / vscode-action-buttons

VsCode extension for custom status bar buttons
88 stars 24 forks source link

Any way to pass variable to command? #74

Open anshibanov opened 2 years ago

anshibanov commented 2 years ago

I want realize button that will run play with specific tag. Example "command": "ansible-playbook run ${file} --tags=<VARIABLE> Any way to pass variable to command?

lukhirt commented 1 year ago

Hi, I have similar problem. The main page lists an "args" parameter for a command. This is similar to what can be found in command specification in keybindings.json, however here it doesn't seem to work.

"command": "workbench.action.tasks.runTask",
"args": {
  "task": "openBuildLog",
},

or

"command": "workbench.action.tasks.runTask",
"args": "openBuildLog",

Both versions work when specified in keybindings.json.

Cheers