* range in parameter
@ 2002-04-08 21:05 Dennis Haney
2002-04-08 21:15 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Dennis Haney @ 2002-04-08 21:05 UTC (permalink / raw)
To: zsh-users
I have a program which has a switch takes a number between 0 and 100:
_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?
--
Dennis
use Inline C => qq{void p(char*g){printf("Just Another %s Hacker\n",g);}};p("Perl");
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: range in parameter
2002-04-08 21:05 range in parameter Dennis Haney
@ 2002-04-08 21:15 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2002-04-08 21:15 UTC (permalink / raw)
To: Dennis Haney; +Cc: zsh-users
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-08 21:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08 21:05 range in parameter Dennis Haney
2002-04-08 21:15 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).