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

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



From: "Peter Stephenson"
> 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.

This does not seem change anything apart from being able to complete
/cyg<TAB>
to /cygdrive (but not the subdirectories like "zstyle .. fake-files .. "
can).

> 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.

Yep, this works.

The reason I bumped into this problem is because I compiled
my own zsh with implicit '(#i)' in front of all filename generation
occurrences.
By your description of the zsh internals this is a crappy approach.

This is a major nuisance: If I want to do something like

  grep na*/100/src/*.{c,h,cpp}

I really have to use

  grep (#i)na*(#I)/100/(#i)src/*.{c,h,cpp}

> 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
> internally.
>
I assume you mean that zsh does a lot of work because it thinks the
underlying file
system is case-sensitive.

Vagn Johansen



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