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

completion: matcher(-list) and tags


I am trying to get this to work:

  zstyle ':completion:*:all-files' matcher-list '' \
         'm:{[:lower:]}={[:upper:]}' '+e:=*' '+b:=*'

because I do not need the matcher-list to apply for all tags (and it is
too slow with slower machines). But the zstyle does not work.

Looking through zshcompsys(1), I find a paragraph under the tag-order
explanation, saying that matcher-list "is tested very early in the
completion system and hence can't be set for single commands nor for more
specific contexts" (but if so, shouldn't such matcher-list usage exit with
an error?). So I try to adapt a tag-order + matcher example to test things

zsh --no-rcs
autoload -Uz compinit; compinit
zstyle ':completion:*' format '=== %d ==='
zstyle ':completion:*' tag-order '*:-case:XXX'
zstyle ':completion:*:*-case' matcher 'm:{a-z}={A-Z}'

And it seems to work for commands, but not for files... What am I doing
wrong (zsh-4.3.10)?

Below is a snippet from a testing run with the above zstyles (ran from
/usr/bin, with it being in path and containing the Xorg binary):

1. 'ls<TAB>' shows '=== XXX ==='
2. 'ls <TAB>' shows '=== XXX ==='
3. 'ls xorg<TAB>' prints '=== `files' or `XXX' ==='
4. 'xorg<TAB>' completes to 'Xorg'
5. './xorg<TAB>' prints
   === `external command', `XXX', `executable file or directory', `builtin
   command', `shell function', `alias', `suffix alias', `reserved word',
   `job', or `parameter' ===

--  RogutÄs Sparnuotos

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