热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

VSCode终端+GitBash"命令未找到"任何命令

如何解决《VSCode终端+GitBash"命令未找到"任何命令》经验,为你挑选了1个好方法。

我的settings.json很简单,它用sh.exe替换cmd.exe(来自git).

{
    "terminal.integrated.shell.windows": "C:\\Program Files (x86)\\Git\\bin\\sh.exe"
}

打开外壳后,绝对没有任何作用.我甚至不能.

sh.exe"-3.1$ ls
sh.exe": ls: command not found
sh.exe"-3.1$ cd ..
sh.exe"-3.1$ ls
sh.exe": ls: command not found
sh.exe"-3.1$

VSCode不适用于Mingw32(git的bash)吗?如何设置它?



1> Flux..:

所以git bash需要两个参数--login和单独的-i

因此,完整的json需要看起来像:

{
    "terminal.integrated.shell.windows": "C:\\Program Files (x86)\\Git\\bin\\bash.exe",
    "terminal.integrated.shellArgs.windows": ["--login","-i"]
}

这将导致所有命令在集成终端中工作.


推荐阅读
author-avatar
羽星快乐_914_137
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有