git bash中的“开始”命令(Windows资源管理器中的打开目录)中的“ cmd:找不到命令”?

1 git shell command-line

为什么在Explorer命令中显示目录在git bash中不起作用?这是我输入的内容: 在此处输入图片说明

mkl*_*nt0 6

即使没有必要,请尝试以下操作:

/c/Windows/System32/cmd.exe //c 'start .'
Run Code Online (Sandbox Code Playgroud)

start是位于内部cmd.exe的命令,因此必须使用调用cmd /c(并且Git Bash显然需要 /字符加倍。要被识别为cmd -style选项前缀字符)。

但是,它一个shell脚本包装- /usr/bin/start-它可以实现这个要求。

就您而言,此shell脚本意外地抱怨找不到cmd,即使默认情况下/c/WINDOWS/system32应在您的$PATH环境变量中-请检查该变量并查看是否在某处意外地对其进行了修改。

$PATH最初是在中定义的/etc/profile,但可以在中进行覆盖/修改~/.bash_profile

/etc/profile 在评论中还包含有用的链接:

# Some resources...
# Customizing Your Shell: http://www.dsl.org/cookbook/cookbook_5.html#SEC69
# Consistent BackSpace and Delete Configuration:
#   http://www.ibb.net/~anne/keyboard.html
# The Linux Documentation Project: http://www.tldp.org/
# The Linux Cookbook: http://www.tldp.org/LDP/linuxcookbook/html/
# Greg's Wiki http://mywiki.wooledge.org/
Run Code Online (Sandbox Code Playgroud)