VSCode: How to run a command after each terminal open?

Sébastien picture Sébastien · Aug 11, 2017 · Viewed 10.3k times · Source

On Windows I have to run the command start-ssh-agent.cmd on each new terminal session I open. My development environment 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 ?

enter image description here

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

Any idea?

Answer

Jacob Bolda picture Jacob Bolda · Aug 11, 2017

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