Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: Completion problems on cygwin when nocaseglob is set
- X-seq: zsh-users 12086
- From: "John Cooper" <John.Cooper@xxxxxxxxxx>
- To: "Peter Stephenson" <pws@xxxxxxx>, "Zsh Users" <zsh-users@xxxxxxxxxx>
- Subject: RE: Completion problems on cygwin when nocaseglob is set
- Date: Tue, 23 Oct 2007 15:04:01 +0100
- Cc: "John Cooper" <John.Cooper@xxxxxxxxxx>
- In-reply-to: <200710231156.l9NBuQwA019246@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <DD74FBB8EE28D441903D56487861CD9D223A0DF0@xxxxxxxxxxxxxxxxxxxxxx><20a807210710200509t43730713oa909fce4e0a57940@xxxxxxxxxxxxxx><DD74FBB8EE28D441903D56487861CD9D223A0DF8@xxxxxxxxxxxxxxxxxxxxxx><20071022103452.6c0580c6@news01><DD74FBB8EE28D441903D56487861CD9D224E86E7@xxxxxxxxxxxxxxxxxxxxxx><20071022123128.2db6000c@news01><DD74FBB8EE28D441903D56487861CD9D224E8A05@xxxxxxxxxxxxxxxxxxxxxx> <20071023101151.3757a369@news01> <DD74FBB8EE28D441903D56487861CD9D225F6432@xxxxxxxxxxxxxxxxxxxxxx> <200710231156.l9NBuQwA019246@xxxxxxxxxxxxxx>
- Thread-index: AcgVa7IEaqnx6hcXTIm1LClDGv1ArAADxMUg
- Thread-topic: Completion problems on cygwin when nocaseglob is set
Excellent - I can confirm "mkdir /c" does provide a workaround, and "ls
/c/<TAB>" now works.
However, with "setopt nocaseglob", I can no longer complete using "ls
c:/<TAB>" regardless of whether I "mount -c /" or "mount -c /cygdrive".
If I "setopt caseglob", I can then complete using "ls c:/<TAB>". This
again also used to work fine with "setopt nocaseglob" in zsh 4.2.6 (with
earlier cygwin library) on WinXP.
I've tried setting the following but they don't help:
$ zstyle
fake-files
:completion:* /:c /:d /:b /:o /:w /:r /:v
accept-exact
:completion:*:paths c: d: b: o: w: r: v:
Btw, thanks very much for all the time you've spent looking into this.
--- John.
-----Original Message-----
From: Peter Stephenson [mailto:pws@xxxxxxx]
Sent: 23 October 2007 12:56
To: Zsh Users
Subject: 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