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

trying to understand how the zsh completer works



Hello,

I am trying to tell the completer to use a different completer based on context.

In this situation, I am trying to tell it to use the _approximate
completer when completing the argument-rest context of grep.

zstyle -L
zstyle -L
zstyle ':completion:*' accept-exact-dirs true
zstyle ':completion:*:options' auto-description %d
zstyle :auto-fu:var autoable-function/skiplines '[[:blank:]\\\\\"'\'']*'
zstyle :auto-fu:var autoable-function/skipwords '[\\\\]*'
zstyle ':completion::complete:*' cache-path /home/j/var/zsh/zcompcache
zstyle :completion::complete:grep:argument-rest: completer _approximate
zstyle ':completion:hist-complete:*' completer _history
zstyle ':completion::*' completer _complete
zstyle :auto-fu:highlight completion 'bold,fg=blue'
zstyle :auto-fu:highlight completion/one 'fg=blue'
zstyle ':completion:*:options' description yes
zstyle :auto-fu:var disable magic-space
zstyle :auto-fu:var enable all
zstyle :auto-fu:var eof-installed-p yes
zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f'
zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f'
zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f'
zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f'
zstyle ':completion:*' format ' %F{yellow}-- %d --%f'
zstyle ':completion:*:matches' group yes
zstyle ':completion:*' group-name ''
zstyle :auto-fu:highlight input
zstyle :auto-fu:var isearchmap-installed-p yes
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=*
r:|=*' 'l:|=* r:|=*'
zstyle ':completion:predict:*' menu yes
zstyle ':completion:*:*:*:*:*' menu select
zstyle ':completion:*' menu 'select=1'
zstyle :auto-fu:var misc-installed-p yes
zstyle :auto-fu:var postdisplay
zstyle :auto-fu:var preexec-installed-p yes
zstyle ':completion:*' show-completer true
zstyle ':completion::complete:*' use-cache on
zstyle ':completion:*' use-compctl false
zstyle :predict verbose true
zstyle ':completion:*' verbose yes
--(~/etc/zsh)----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(pts/12@master)--

--(~/etc/zsh)----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(pts/12@master)--
zstyle ':completion::*' completer _complete
zstyle ':completion::*' completer _complete
--(~/etc/zsh)----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(pts/12@master)--
zstyle ':completion::complete:grep:argument-rest:' completer  _approximate
zstyle ':completion::complete:grep:argument-rest:' completer _approximate
--(~/etc/zsh)----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(pts/12@master)--
grep test 44
tags in context :completion::complete:grep::
    argument-rest options  (_arguments _grep (eval))
tags in context :completion::complete:grep:argument-rest:
    all-files  (_files _arguments _grep (eval))

I do not see the approximate completer being used here.

Any thoughts on what I am missing please?

Thanks
Joe



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