VSCode:每个终端打开后如何运行命令? [英] VSCode: How to run a command after each terminal open?

查看:2507
本文介绍了VSCode:每个终端打开后如何运行命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows上,我必须在打开的每个新终端会话上运行命令start-ssh-agent.cmd.我的开发环境是VSCode,每天我都会打开十几个新终端.每个终端打开后,我必须手动运行此命令.

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 ?

这可以采用VSCode扩展名,VSCode配置(设置)或Windows环境配置的形式.

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

有什么主意吗?

推荐答案

您可以执行以下操作:

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

修改自: https://code.visualstudio.com/docs/editor/integrated-terminal#_shell-arguments

这篇关于VSCode:每个终端打开后如何运行命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆