I'm thinking of writing a script for cygwin to cd into a windows directory which is copied from Windows explorer.
e.g.
cdw D:\working\test equals to
cd /cygdrive/d/working/test But it seems for shell script, all backslashs in parameters are ignored unless using single quote 'D:\working\test' or double backslashs D:\\working\\test.
But in my case it would be very inconvenience because I can't simply paste the directory name in the command line to execute the script.
Is there any way to make cdw D:\working\test working?
cdwwithout parameter and then paste the path as an input.cdwis run as a separate script, it will run as a separate process. Whilecdwmay actuallychdirto the correct location, this will not affect the current directory of the process that called it. You'd need to definecdwas a function for that.alias cdw=. /home/deqing/scripts/cdw.sh, so it can still stay in a script.