在 Vscode中配置终端集成bash
- 步骤一:打开 Vscode 选择左上角 : 文件 -> 首选项 -> 设置
- 步骤二:搜索栏搜索:
shell windows
- 步骤三:
"Git Bash":
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git-Bash": {// 原位置在Git Bash 没有加 - 需要自己添加
"path": "C:\\Git\\bin\\bash.exe" //在电脑中找到自己安装的 bash.exe 文件位置
}
}
- 步骤四:重新打开Vscode 在目标文件下,鼠标右键