更新时间:2023-02-18 14:48:47
截至 2018 年 6 月 17 日,在更改集成命令外壳方面,Visual Studio Code 中的事情变得非常顺利.我在这里列出了所有选项:
powershell
,按 Enter,命令外壳将更改为 PowerShell.同样,它适用于您产品中安装的所有其他类型的命令 shell.Terminal: Select Default Shell
如图所示在下面的快照中.选择后,然后选择您选择的默认命令外壳以永久更改设置:
I looked at this link which talks about changing the default command shell in the integrated terminal of Visual Studio Code. I was successfully able to change it to Git Bash using the below setting in the settings.json
file. You can open the settings.json
file by pressing the Ctrl + , key combination or menu File → Preferences → Settings menu:
{
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
}
There is a + sign in the integrated terminal with the help of which you can have multiple terminals running parallelly as shown in the screenshot below:
I want to load a Git Bash shell in terminal # 1, Windows PowerShell in terminal # 2, etc. What is the relevant configuration to achieve the same?
As of June 17 '2018, things have become really smooth in Visual Studio Code when it comes to changing the integrated command shell. I'm enlisting all the options here:
powershell
, press Enter and the command shell changes to PowerShell. Similarly it works for all other types of command shells installed in your product.Terminal: Select Default Shell
as shown in the snapshot below.Once selected, then choose the default command shell of your choice to change the settings permanently: