Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
_values and end of options
- X-seq: zsh-workers 38638
- From: Marko Myllynen <myllynen@xxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: _values and end of options
- Date: Thu, 9 Jun 2016 15:24:37 +0300
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Red Hat
- Reply-to: Marko Myllynen <myllynen@xxxxxxxxxx>
Hi,
Below is a minimal example created based on a larger completion:
#compdef foo
local -a opts
opts=( -a -b -c -1 -2 -3 )
_values -w opts $opts
Otherwise this works nicely (each of the options is completed only once)
but -1 -2 are missing from offered options (see _values). I can use --
to have them included as well (_values -w opts -- $opts) but then -- is
also offered.
Can _values be used reliably in cases where there might be options as
values? Or is there a better way to achieve this with compadd or such
for the above case?
Thanks,
--
Marko Myllynen
Messages sorted by:
Reverse Date,
Date,
Thread,
Author