Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion match ordering
- X-seq: zsh-workers 43846
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: completion match ordering
- Date: Mon, 26 Nov 2018 09:37:48 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181126093751euoutp010ec34e228d334caf19877d3b90430951~qowbEFcJS2779727797euoutp01H
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1543225071; bh=gcWFI7A6CII21o0KbpgDiIifzZnlu8Z1w6mv+Qzhgbc=; h=Subject:From:To:Date:In-Reply-To:References:From; b=pw7OuozzJOKV0Kd3IcjtjQ8RVjfJUAS4hdUFUjNFvmIPnttIbuQn17GRF00BWcQkN CFeeKy83Wwv3uREAh50bnonbbCozoTD4alKjP1OiSJwI1HV/GhT7J97b3QLdg7KKtx hD1QcsIUGWnPctRhR/HZ+oqmSdA3xvbTweYZRHBM=
- In-reply-to: <76839-1543195550.251964@c6AU.RX4q.p78d>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <75B26F45-E6E6-44BB-80A4-7301CBE480FE@dana.is> <88812-1541586959.338018@YaNA.ZOZt.NKaA> <CGME20181126012646epcas4p14f64caffab41476ff279836b69c26485@epcas4p1.samsung.com> <76839-1543195550.251964@c6AU.RX4q.p78d>
On Mon, 2018-11-26 at 02:25 +0100, Oliver Kiddle wrote:
> On 7 Nov, I wrote:
> >
> > You can do:
> > _arguments '-b-:level: compadd "${(@)expl/#-J/-2V}" ${(on)levels}'
> > But what you have is perhaps better, especially as it's duplicated for
> > -b and -e.
> The patch below is an initial experiment for what I was suggesting.
> It allows, e.g:
> _arguments '-b-:level:compadd -o numeric -a levels'
>
> Any thoughts on the interface? Is something more terse like -on
> preferable? The -V option becomes superfluous (but remains for
> compatibility). Instead of -V grp you can use -J grp -o nosort.
Thanks, this certainly looks useful.
Terseness has it's uses --- some of the completion syntax would be very
wordy otherwise --- but I think spelling it out is reasonable here.
> Do we need to worry about this breaking uses of the old -o?
Ideally, I suppose, yes, even if it's not widely used. The more obscure
the use, the harder to track down if it does break something...
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author