zsh-users
 help / color / mirror / code / Atom feed
From: John Cooper <John.Cooper@eu.citrix.com>
To: "zsh-users@zsh.org" <zsh-users@zsh.org>
Cc: John Cooper <John.Cooper@eu.citrix.com>
Subject: RE: Case-insensitive completion problems with Cygwin 1.7
Date: Sun, 26 Sep 2010 19:59:44 +0100	[thread overview]
Message-ID: <FFDB98DC9661D3418B9EB0FF5202E46B8D331851BE@LONPMAILBOX01.citrite.net> (raw)
In-Reply-To: <000201cb5d9a$e2ecfd40$a8c6f7c0$@ntlworld.com>

Through trial-and-error I found that changing fake-files to be:
  zstyle ':completion:*' fake-files '/c:c:' '/d:d:' '/b:b:' '/o:o:' '/w:w:' '/r:r:' '/v:v:'
.. instead of:
  zstyle ':completion:*' fake-files '/:c:' '/:d:' '/:b:' '/:o:' '/:w:' '/:r:' '/:v:'

.. allows case-insensitive completion to work correctly, even when using a drive letter.

However, I've noticed 2 side-effects:

1. When I type `ls /c/<Tab>' the listing includes a spurious 'c:' entry. This does not happen when I use `ls c:/<Tab>'.
2. When I use `ls /c/<Tab>' files with the `execute' bit set are shown according to the `ex' color I've defined in LS_COLORS, and this matches the coloring I see when I just type `ls'. However, when I use `ls c:/<Tab>' executable files are not colorized as expected (just shown as white). It's as if the executable-ness of files is somehow lost when completing via c:/.

Btw, for the coloring I have the following in my .zshrc:
  zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}

    --- John.

-----Original Message-----
From: John Cooper [mailto:super.cooper@ntlworld.com] 
Sent: 26 September 2010 5:50 PM
To: zsh-users@zsh.org
Cc: John Cooper
Subject: Case-insensitive completion problems with Cygwin 1.7

I've just upgraded to Cygwin 1.7 (and zsh 4.3.10) and found that
case-insensitive completion no longer works when the path starts with a
drive letter.

If I start off with `zsh -f' file completion works as expected even when
using a drive letter:
$ ls /c/<TAB>    # works as expected
$ ls c:/<TAB>    # works as expected

However, after running the following (to allow for case-insensitive
completion):
  zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
  autoload -U compinit
  compinit -C
$ ls /c/<TAB>   # still works as expected
$ ls c:/<TAB>   # fails - no completions are listed

Previously I was using zsh 4.3.2 running under Cygwin 1.5, and I used to
additionally have the following lines in my .zshrc:
zstyle ':completion:*:paths' accept-exact 'c:' 'd:' 'b:' 'o:' 'w:' 'r:' 'v:'
zstyle ':completion:*' fake-files '/:c' '/:d' '/:b' '/:o' '/:w' '/:r' '/:v'

This allowed completion to work when using drive letters in zsh 4.3.2, but
it doesn't work with zsh 4.3.10 and Cygwin 1.7.

Is there any other way around this, so that I can still perform
case-insensitive completion using c:/ ?

Btw, my /etc/fstab contains the following, which allows me to use /c/ rather
than the default /cygdrive/c/
none / cygdrive binary,posix=0,user 0 0

Thanks,

    --- John.



  reply	other threads:[~2010-09-26 19:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26 16:50 John Cooper
2010-09-26 18:59 ` John Cooper [this message]
2010-09-27 18:40   ` John Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FFDB98DC9661D3418B9EB0FF5202E46B8D331851BE@LONPMAILBOX01.citrite.net \
    --to=john.cooper@eu.citrix.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).