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

Re: Completion problems on cygwin when nocaseglob is set

"John Cooper" wrote:
> Setting the fake-files zstyle doesn't help.

That's very strange, since that's got nothing to do with Cygwin and it
does work elsewhere.  But I can see that too, and I can see that
fake-files does produce files that actually aren't there (e.g. if I use
"/:a b c" I get a and b).  However, unfortunately the setting in question
disappears into the horrors of compfiles.  This looks like a bug that
may or may not be associated with the other problems.

> "print /*" does not include "/c" after I "mount -c /" (I don't know
> whether it should?).

This is likely to be the cause of why this case is different (even if
the shell is doing something a bit weird, too).  If globbing can't see
it compfiles won't.  What's more, with this knowledge I can reproduce
your problem: I had a directory /c that I was using for mount c:
directly and with "cygpath -c /" this was appearing for globbing an the
completion system.  This gives a workaround, at least: "mkdir /c".

I can't see why /c wouldn't appear to globbing, but it doesn't in bash
either so presumably readdir() doesn't return it.  This is a question
for the Cygwin people.  Since, as you say

> If I "mount -c /cygdrive" then "print /*" includes "/cygdrive" (and
> completion works), and "print /cygdrive/*" lists all my mounted drives.

this looks to me like a bug, or at the least a limitation of overlaying
the drives on an existing directory.

> However, with zsh 4.2.6 (and an earlier version of cygwin) on WinXP,
> "print /*" also does not include "/c", but completion works here.

I've no idea why this would be different.  None of the changes I can see
in compfiles look like they would make a difference.  It ought to be
possible (even easy, if you know how to do it) to add a special case so
that a statable file is always added as a match.  However, maybe it should
be doing that anyway.  If anybody understood compfiles they might be
able to answer this.  I hesitate to do this without more thought.

It would help if I could debug this on a native Unix operating system.

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070

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