This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Change Directory


Thanks to all.
I was able to get it to work with "/c/my directory name"


Todd Poole

On 2/24/2014 10:06 AM, Eric Blake wrote:
On 02/23/2014 03:40 PM, David Stacey wrote:
On 23/02/14 22:27, Todd Poole wrote:
Getting confused on something. From bash terminal I can change
directory like so:

$ cd /c/directoryname

But if the directory has multi words it does not recognize the directory:

$ cd /c/my directory name

Is there a way to get cygwin to recognize multiple names in a directory?

Either surround the whole path in quotes, or use a backslash character
'\' before each space:

     cd "/c/my directory name"
     cd /c/my\ directory\ name

Or use zsh instead of bash (zsh auto-tries concatenating multi-argument
names into a single-argument directory containing spaces), or write a
bash function for cd that tries 'command cd "$*"' when $# > 1.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]