需要使Git Bash成为默认终端,但不是直接通过将路径设置为bash.exe
in "terminal.integrated.shell.windows":
,而是通过VS Code 界面:
那些。在此子菜单中选择“Git Bash”配置文件,或将其设置为默认配置文件:
但 VS Code 看不到“Git Bash”配置文件
settings.json
:
"terminal.integrated.profiles.windows": {
"Git Bash": {
//"source": "Git Bash",
"icon": "terminal-bash",
"path": "D:\\Web\\Git\\bin\\bash.exe"
},
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
}
}