我想添加一些dirs到我的PATH。
不幸的是,这些目录位于包含空格的窗口路径中(如文档和设置)
不幸的是,这些目录位于包含空格的窗口路径中(如文档和设置)
我没有成功尝试:
创建一个变量:
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
使用软链接:
它正在工作…但我不想使用这个
任何建议?
这样做:
原文链接:https://www.f2er.com/bash/387959.html$ winhome="/cygdrive/c/Documents and Settings/" $ cd "$winhome" $ pwd /cygdrive/c/Documents and Settings