Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git-bash $PATH cannot parse windows directory with space

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.

for example the $PATH outputs:

"..../c/Program: No such file or directory"

Is there anyway to fix it? where is the git-bash script to construct the $PATH for git shell? Thanks

like image 765
wyonghao Avatar asked Jul 03 '14 15:07

wyonghao


Video Answer


2 Answers

Why not using absolute path instead of relative path and if a folder of file name contains a space just use "" (quotes).

Ex. cd C:/Users/"My Folder"

like image 124
Chris Hermut Avatar answered Sep 18 '22 07:09

Chris Hermut


Put a backslash ("\") before the space.

ex. cd My\ Documents

like image 45
Sam Haars Avatar answered Sep 20 '22 07:09

Sam Haars