zsh-users
 help / color / mirror / code / Atom feed
* Completion problem when `nocaseglob' is set
@ 2008-10-28 18:31 John Cooper
  2008-10-28 18:37 ` Mikael Magnusson
  0 siblings, 1 reply; 4+ messages in thread
From: John Cooper @ 2008-10-28 18:31 UTC (permalink / raw)
  To: zsh-users; +Cc: John Cooper

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'

Thanks,

    --- John.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Completion problem when `nocaseglob' is set
  2008-10-28 18:31 Completion problem when `nocaseglob' is set John Cooper
@ 2008-10-28 18:37 ` Mikael Magnusson
  2008-10-29 10:18   ` John Cooper
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2008-10-28 18:37 UTC (permalink / raw)
  To: John Cooper; +Cc: zsh-users

2008/10/28 John Cooper <John.Cooper@eu.citrix.com>:
> 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@csr.com>

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

[sic]

-- 
Mikael Magnusson


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Completion problem when `nocaseglob' is set
  2008-10-28 18:37 ` Mikael Magnusson
@ 2008-10-29 10:18   ` John Cooper
  2008-11-10 12:08     ` zzapper
  0 siblings, 1 reply; 4+ messages in thread
From: John Cooper @ 2008-10-29 10:18 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: zsh-users

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@gmail.com] 
Sent: 28 October 2008 18:37
To: John Cooper
Cc: zsh-users@sunsite.dk
Subject: Re: Completion problem when `nocaseglob' is set

2008/10/28 John Cooper <John.Cooper@eu.citrix.com>:
> 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@csr.com>

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

[sic]

-- 
Mikael Magnusson

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Completion problem when `nocaseglob' is set
  2008-10-29 10:18   ` John Cooper
@ 2008-11-10 12:08     ` zzapper
  0 siblings, 0 replies; 4+ messages in thread
From: zzapper @ 2008-11-10 12:08 UTC (permalink / raw)
  To: zsh-users

John Cooper wrote in
news:DD74FBB8EE28D441903D56487861CD9D38839DF6@lonpexch01.citrite.net: 

> 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@gmail.com] 
> Sent: 28 October 2008 18:37
> To: John Cooper
> Cc: zsh-users@sunsite.dk
> Subject: Re: Completion problem when `nocaseglob' is set
> 
> 2008/10/28 John Cooper <John.Cooper@eu.citrix.com>:
>> 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'. 
>>
>> 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,
> 

Peter Castro maintains zsh on Cygwin 
http://www.fruitbat.org/Cygwin/index.html

Peter Castro at: doctorATfruitbatDOTorg

I'd like an new version with c:/ completion as well!


-- 
zzapper

http://www.successtheory.com/tips/zshtips.html
http://www.successtheory.com/tips/cygwintips.php   (in progress)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-10 12:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-28 18:31 Completion problem when `nocaseglob' is set John Cooper
2008-10-28 18:37 ` Mikael Magnusson
2008-10-29 10:18   ` John Cooper
2008-11-10 12:08     ` zzapper

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).