1 在Windows系统下,VS Code默认的终端为powershell,不支持wc -l 等bash命令。
2 安装Git Bash。
3 可自由选择使用powershell或者Git Bash。
1 为VS Code配置git bash 1.1 安装git
默认安装的情况下,bash.exe的路径为C:Program FilesGitbin。
1.2 配置VS Code的setting.json打开setting.json,并添加如下命令,用于强制制定集成终端的shell:
"terminal.integrated.profiles.windows": {
"Git Bash": { //自定义名称
"path": "C:\Program Files\Git\bin\bash.exe", //路径
"args": [],
"icon": "terminal-bash" //该终端的图标
}
},
"terminal.integrated.defaultProfile.windows": "Git Bash", //设置Git Bash为默认终端
1.3 重启窗口
重启VS Code后,其终端便为Git Bash了。
2 任意选择VS Code的终端Shell(便捷方式)
3 参考
integrated-terminal



