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


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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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