Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: range in parameter
- X-seq: zsh-users 4820
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Dennis Haney <davh@xxxxxxx>
- Subject: Re: range in parameter
- Date: Mon, 8 Apr 2002 14:15:17 -0700 (PDT)
- Cc: zsh-users <zsh-users@xxxxxxxxxx>
- In-reply-to: <3CB20607.5030807@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Sender: schaefer@xxxxxxxxxxxxxxxx
On Mon, 8 Apr 2002, Dennis Haney wrote:
> _arguments \
> {'(-v)--volume','(--volume)-v'}"[Set audio volume to N
> (0-100)]:volume:" \
>
> But how do I specify that all number between 0 and 100 are valid params
> without having to type all 100?
Like this:
_arguments \
{'(-v)--volume','(--volume)-v'}"[...]:volume:({0..100})"
^^^^^^^^^^
That's not using any special _arguments magic, by the way. The {0..100}
form is expanded anywhere regular brace expansion applies.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author