zsh-workers
 help / color / mirror / code / Atom feed
From: joe M <joe9mail@gmail.com>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: zsh-workers@zsh.org
Subject: trying to understand how the zsh completer works
Date: Thu, 28 Feb 2013 18:38:04 -0500	[thread overview]
Message-ID: <CAHjjW15xdpu12e9k9XgUjkK_h82ccr5d2TO2pNVXevj2OCarSA@mail.gmail.com> (raw)

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


             reply	other threads:[~2013-02-28 23:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28 23:38 joe M [this message]
2013-03-01  5:56 ` Bart Schaefer
2013-03-03  6:09   ` Bart Schaefer
2013-03-03 15:56     ` joe M
2013-03-03 18:05       ` Bart Schaefer

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=CAHjjW15xdpu12e9k9XgUjkK_h82ccr5d2TO2pNVXevj2OCarSA@mail.gmail.com \
    --to=joe9mail@gmail.com \
    --cc=okiddle@yahoo.co.uk \
    --cc=zsh-workers@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).