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

RE: Completion problem when `nocaseglob' is set



Thanks for letting me know. 4.3.5 isn't available yet via Cygwin's setup.exe, so I've installed version 4.3.2, which doesn't exhibit the problem.

    --- John.

-----Original Message-----
From: Mikael Magnusson [mailto:mikachu@xxxxxxxxx] 
Sent: 28 October 2008 18:37
To: John Cooper
Cc: zsh-users@xxxxxxxxxx
Subject: Re: Completion problem when `nocaseglob' is set

2008/10/28 John Cooper <John.Cooper@xxxxxxxxxxxxx>:
> I've just upgraded to zsh 4.3.4 (via Cygwin) and have found that
> completion in the root C: drive no longer works when I `setopt
> nocaseglob'. It was working fine with my previous version of zsh
> 4.<something> that I installed a couple of years ago, but I don't recall
> the exact version.
>
> After running `zsh -f', the following both work fine and list the files
> in the root of my C drive:
> $ ls c:/<TAB>    # lists files as expected
> $ ls /c/<TAB>    # lists files as expected
>
>  (btw, I have the cygwin drive prefix set to "/" instead of
> "/cygdrive")
>
> The problem starts when I set the `nocaseglob' option:
> $ setopt nocaseglob
> $ ls c:/<TAB>    # no files listed
> $ ls /c/<TAB>    # no files listed
>
> A couple of years ago I experienced the same problem and, after getting
> help from this list, I resolved it by doing:
> $ mount -c /cygdrive
> $ /usr/bin/mkdir /c
> $ /usr/bin/mount -c /
>
> Apparently, creating the /c directory allowed it to become visible to
> the globbing system (it's listed in `print /*'), although I don't
> understand why this is only needed when `nocaseglob' is in effect.
>
> Anyway, with zsh 4.3.4, the above is now only a partial fix:
>
> $ ls /c/<TAB>    # lists files as expected
> $ ls c:/<TAB>    # no files listed
>
> Does anyone know how I can get completion to work using c:/<TAB> with
> zsh 4.3.4 with `nocaseglob' enabled?
>
> I've tried the following, but to no avail:
>  zstyle ':completion:*:paths' accept-exact 'c:'
>  zstyle ':completion:*' fake-files '/:c'

This is a bug that was fixed in 4.3.5,

2007-10-23  Peter Stephenson  <pws@xxxxxxx>

	* users/12087: Src/glob.c: fix a case where we doing globbing
	unncessarily to find files case-insensitively in Cygwin.

[sic]

-- 
Mikael Magnusson


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