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

Re: completion

On 2015-01-07 10:48:39 -0800, Bart Schaefer wrote:
> On Jan 7, 2015 7:15 AM, "Vincent Lefevre" <vincent@xxxxxxxxxx> wrote:
> > If an asterisk can match anything, there may be an ambiguity on
> > which field some given word will match.
> This is actually intentional, so that a single style can be applied to
> multiple contexts.  The expected use is that the wildcard will usually be
> at the tail of the context string, so it's a shorthand to avoid having to
> write out all the trailng colons.

But the ambiguity shouldn't be intentional. The syntax is:


Now consider one of the examples:

      zstyle ':completion:*:complete:*' matcher-list [...]

If * matches everything, then this could mean either

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

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