Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problem with /cygdrive and (#i) globbing flag

"Vagn Johansen" wrote:
> />ls /cygdrive/c/c* 
> /cygdrive/c/chop.txt  /cygdrive/c/cygwin.zip
> />ls (#i)/cygdrive/c/c*
> zsh: no matches found: (#i)/cygdrive/c/c*

The problem is that the /cygdrive is a bogus directory.  To do
case-insensitive matching, zsh has to compare every entry in every
directory to see if it matches, even if it doesn't contain wildcards.
So it starts be looking at all the files in /, and fails to find

I think you can get away with `mkdir /cygdrive' --- at least it seems to
work for me.  Now zsh can see it when it looks at the root directory,
but cygwin still treats the path specially, so reading /cygdrive shows
all the drives.

Another sure-fire method is to put the (#i) after the bit you don't need
to compare case-insensitively, i.e. /cygdrive/c/(#i)c*.  This should be
faster, for reasons which the first paragraph should indicate.

Of course, zsh doesn't *need* to do all that work to get case
insensitivity under Windows, but it would be hard work convincing it

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070

The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
If you received this in error, please contact the sender and 
delete the material from any computer.

Messages sorted by: Reverse Date, Date, Thread, Author