我想添加一些dirs到我的PATH。
@H_502_1@不幸的是,这些目录位于包含空格的窗口路径中(如文档和设置)
我没有成功尝试:
创建一个变量:
43598811@E250BZD20015026 ~ $ winhome="/cygdrive/c/Documents\ and\ Settings/43598811/" 43598811@E250BZD20015026 ~ $ cd $winhome bash: cd: /cygdrive/c/Documents\: No such file or directory 43598811@E250BZD20015026 ~ $ cd "$winhome" bash: cd: /cygdrive/c/Documents\ and\ Settings/43598811/: No such file or directory
创建一个别名:
43598811@E250BZD20015026 ~ $ alias winhome="/cygdrive/c/Documents\ and\ Settings/43598811/" 43598811@E250BZD20015026 ~ $ winhome bash: /cygdrive/c/Documents and Settings/43598811/: is a directory 43598811@E250BZD20015026 ~ $ cd winhome bash: cd: winhome: No such file or directory
任何建议?
这样做:
$ winhome="/cygdrive/c/Documents and Settings/" $ cd "$winhome" $ pwd /cygdrive/c/Documents and Settings