Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Complete value from list with colons
- X-seq: zsh-users 24189
- From: dana <dana@xxxxxxx>
- To: Scott Frazer <frazer.scott@xxxxxxxxx>
- Subject: Re: Complete value from list with colons
- Date: Mon, 26 Aug 2019 12:39:03 -0500
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=mY9cHxoZ0/oJ/eAkV/2m9Vq6+l6d33gd0zgUv2k/tBw=; b=PW5k3ds4k1wBPBdEqi2iEr5idhNf75P4sN9sfMtNU24JiUcizJzqwLLbK6IC0xEeT4 8AU4Qlfg7xEflQ++49jH/pwYKzO1V1OEXzBCJeLx4LJy8c2Qmh6qaaAqpx7dtqf/Tkfs 0g8uTIoow7ioEKYhk7IrBR8IefgR4LkaeLRIIjCogz+uqO96XPPj2WvWKCsCcnlSqzM+ +b+l9AX/V+FWq+hTOoW93vBB3zfCxf0wGpvzLjK0G2GfU4+4bdDwPGZ0K0+UEUIoFNgm J3mTW9368YyQBYaMSPzRV7ook0YB3KZvuj1UO5wFh5XI8QhfthfFMeNiYfHzLodfR+jn et5g==
- In-reply-to: <qk0n55$24dn$1@blaine.gmane.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <qjrbd6$2r3q$1@blaine.gmane.org> <8e5ab665-a4fb-4c75-a4a4-0a0734148b71@www.fastmail.com> <43968-1566695897.640296@MmkN.TxK5.ExqF> <qk0n55$24dn$1@blaine.gmane.org>
On 26 Aug 2019, at 08:34, Scott Frazer <frazer.scott@xxxxxxxxx> wrote:
> _arguments : '--foo[Which foo to use]:foo:_values whatever 'a\:\:b' 'c\:\:d'
>
> i.e. the --foo option has a limited number of legal values. What would you
> suggest I use here?
If you're using _arguments you can just do like:
'--foo[specify foo to use]:foo:(a\:\:b c\:\:d)'
You can also use this syntax to give each value a description:
'--foo[specify foo to use]:foo:((
a\\\:\\\:b\:"ab foo"
c\\\:\\\:d\:"cd foo"
))'
Though it gets somewhat confusing when you have colons in the values, as you
can see
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author