zsh-users
 help / color / mirror / code / Atom feed
* completion: matcher(-list) and tags
@ 2010-07-22  0:55 Rogutės Sparnuotos
  2010-07-22 16:25 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Rogutės Sparnuotos @ 2010-07-22  0:55 UTC (permalink / raw)
  To: zsh-users

G'day,

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
out:

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


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

end of thread, other threads:[~2010-07-22 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-22  0:55 completion: matcher(-list) and tags Rogutės Sparnuotos
2010-07-22 16:25 ` Bart Schaefer

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).