问题
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?
回答1:
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
来源:https://stackoverflow.com/questions/54409369/possible-to-invoke-a-vscode-extension-command-from-command-line