git-bash $PATH 无法解析带有空格的 windows 目录 [英] git-bash $PATH cannot parse windows directory with space
问题描述
我想在 Windows 7(32 位)机器上使用带有 github 客户端的 git-bash.不知何故,git-bash 已经从 windows 系统 PATH
中学习了 $PATH
变量.但是,我发现 git-bash 中的 $PATH
没有正确解析带有空格的 win 系统 PATH.
I would like to use git-bash come with github client on a windows 7 (32bit) machine. Somehow, the git-bash has already learned the $PATH
variables from windows system PATH
. However, I found the $PATH
in git-bash did not parse the win system PATH with space correctly.
例如 $PATH
输出:
"..../c/Program: 没有那个文件或目录"
"..../c/Program: No such file or directory"
有什么办法可以解决吗?为 git shell 构建 $PATH
的 git-bash 脚本在哪里?谢谢
Is there anyway to fix it? where is the git-bash script to construct the $PATH
for git shell?
Thanks
推荐答案
为什么不使用绝对path
而不是相对path
并且如果文件夹的文件名包含空格只需使用 ""
(引号).
Why not using absolute path
instead of relative path
and if a folder of file name contains a space just use ""
(quotes).
例如.cd C:/Users/"我的文件夹"
这篇关于git-bash $PATH 无法解析带有空格的 windows 目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!