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

Re: Case-insensitive completion of files with matcher-list



On Mon, 15 Apr 2002, Hannu Koivisto wrote:

> zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
>
> That works fine indeed, but what if I want case-insensitive
> completion only for files?  After reading about contexts and
> fiddling with C-x h, I figured that
>
> zstyle ':completion:*:all-files' matcher-list 'm:{a-zA-Z}={A-Za-z}'
>
> should do the trick

You're not quite right.  matcher-list is used only at the global level,
not for individual tags like all-files.  For an individual tag, you want
to use just the 'matcher' style:

 zstyle ':completion:*:all-files' matcher 'm:{a-zA-Z}={A-Za-z}'

Unfortunately, there appears to be a bug in _path_files -- it copies any
global matcher from matcher-list through to the call to compfiles, but it
doesn't do the same for a matcher passed to it with the -M option (which
is where the string from the matcher style ends up).

Unfortunately I don't see offhand how to fix this.  Sven?



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