Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion
- X-seq: zsh-users 19707
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: completion
- Date: Thu, 8 Jan 2015 01:43:23 +0100
- In-reply-to: <CAH+w=7YQ=VrWFjCXn4q7U48e3R+eNTF9xihHBf-oFDYTVR_zGQ@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <5488D414.6010300@eastlink.ca> <30453.1418258082@thecus.kiddle.eu> <5488F0AC.2040901@eastlink.ca> <141210214454.ZM12261@torch.brasslantern.com> <5489C8F4.8030703@eastlink.ca> <141211092824.ZM13349@torch.brasslantern.com> <5489F1BC.5000900@eastlink.ca> <20150107150109.GA14088@ypig.lip.ens-lyon.fr> <CAH+w=7YQ=VrWFjCXn4q7U48e3R+eNTF9xihHBf-oFDYTVR_zGQ@mail.gmail.com>
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:
:completion:FUNCTION:COMPLETER:COMMAND:ARGUMENT:tag.
___________1________2_________3_______4________5
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]
or
:completion:[any function]:[any completer]:complete:[any arg]:[any tag]
or
: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