VSCode: How to run a command after each terminal o

2019-05-10 22:47发布

问题:

On Windows I have to run the command start-ssh-agent.cmd on each new terminal session I open. My developement environement is VSCode, and I open a dozen new terminals each day. After each terminal open, I have to manually run this command.

Is there is a way to run this command on the terminal each time I open one ?

This may take the form of a VSCode extension, VSCode configuration (settings) or a Windows environnement configuration.

Any idea?

回答1:

You can do the following:

"terminal.integrated.shellArgs.windows": ["start-ssh-agent.cmd"]

Modified from: https://code.visualstudio.com/docs/editor/integrated-terminal#_shell-arguments