Is it possible to invoke a VSCode extension command from a terminal?
I'm aware of the code
command and all the switches under the Extensions Management
category. However, I do not understand if it's possible to invoke a command implemented within a VSCode extension from the command line or it is required that a user must invoke it from the editor's context?
I cannot seem to find a definitive answer after Googling and searching StackOverflow, so I'm asking as a new question. Any insights?
You can also run VS Code from the terminal by typing 'code' after adding it to the path: Launch VS Code. Open the Command Palette (Cmd+Shift+P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command.
All you need to do is press Ctrl+Shift+P and type 'vsix' in the command palette, and VS Code will suggest 'Extensions: Install from vsix…'. When you select this, you need to browse to the file, and hit the 'Install' button.
Ugly workaround I can use - https://marketplace.visualstudio.com/items?itemName=gabrielgrinberg.auto-run-command
write config file and start vscode (which should trigger that task, check if file exists, run commands) and close vscode
Sad, that there is no better solution for a while
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With