Cygwin: using a path variable containing a windows path (with a space in it)

I want to add some dirs to my PATH. Unfortunately these dirs are located in windows path containing space (like the Documents and Settings)

I've unsuccessfully tried to:

Create a variable:

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

Create an alias:

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

Use a soft link: it is working... but I don't want to use this

Any suggestion ?

28
задан Guillaume 2 December 2010 в 13:56
поделиться