栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

VS Code:自由选择不同终端(powershell、bash)

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

VS Code:自由选择不同终端(powershell、bash)

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

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/837691.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号