Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion
On 2015-01-09 18:12:41 -0800, Bart Schaefer wrote:
> On Jan 8, 1:36pm, Vincent Lefevre wrote:
> }
> } I don't understand. I suppose that the real intent of
> }
> } zstyle ':completion:*:complete:*' matcher-list [...]
> }
> } was to match the completer "complete", i.e. like
> }
> } zstyle ':completion:*:complete:*:*:*' matcher-list [...]
> }
> } But what if the context is ":completion::foo:complete::" in some
> } completion, i.e. with the completer "foo" and the command "complete"?
>
> First of all, the completer "_foo" would have had to have been added
> to the "completer" style (the default value of this style is _complete
> and _ignored), and second, the _foo function would have to contain a
> zstyle command that looks up the value of the matcher-list style. If
> either of those conditions does not hold, the context will never be
> ":completion::foo:complete::" and the question is not relevant.
There is something similar in the zshcompsys(1) man page:
zstyle ':completion:*' completer _complete _correct _complete:foo
zstyle ':completion:*:complete:*' matcher-list \
'' 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*:foo:*' matcher-list \
'm:{a-zA-Z}={A-Za-z} r:|[-_./]=* r:|=*'
> The assumption, therefore, is that if the user has deliberately added
> _foo to the completer style, then he is also aware that _foo may want
> to look up match-list, and therefore he will have used the form with
> more colons and/or fewer asterisks when defining the matcher-list for
> each of the two completers that want a matcher-list.
Why hasn't this been done for the man page?
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author