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

Re: completion



On 2015-01-07 21:26:44 -0800, Bart Schaefer wrote:
> On Wed, Jan 7, 2015 at 4:43 PM, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> >       zstyle ':completion:*:complete:*' matcher-list [...]
> >
> > If * matches everything, then this could mean [any of]
> >
> >   :completion:[any function]:complete:[any cmd]:[any arg]:[any tag]
> >   :completion:[any function]:[any completer]:complete:[any arg]:[any tag]
> >   :completion:[any function]:[any completer]:[any cmd]:complete:[any tag]
> 
> You're correct, it could.  But "matcher-list" also has to match, and
> THAT only happens in one of those three cases, so there's no need to
> constrain the pattern any further (unless you WANT to; refer to my
> car-cover analogy).

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"?
It would match, wouldn't it? But the intent was to match only the
completer "complete", not "foo"!

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