|
From: Mikoláš J. <mik...@gm...> - 2009-08-12 14:50:28
|
On Wed, Aug 12, 2009 at 2:50 PM, Radu Grigore<rad...@gm...> wrote:
> On Wed, Aug 12, 2009 at 1:58 PM, Mikoláš Janota<mik...@gm...> wrote:
>> From what you are saying I can't figure out the difference between a
>> blank arg and malformed arg.
>
> It's nice to have a different error message and treat strings and
> integers uniformly.
>
if the example with integers bothers you, consider
s:{"-s"}:{string-regexp} :[between="" regexp="a+" ]
why should -sxxx be considered differently from -s"" ? both "" and
"xxx" are wrong params
(if you want different message just print "" differently)
it seems silly to write
s:{"-s"}:{string-regexp} :[between="" regexp="a*" blankparamallowed="false"]
instead of
s:{"-s"}:{string-regexp} :[between="" regexp="a+" ]
we could probably add a check whether an "" matches the arguments
shape once "" returns as the arg
--m.
m.
>
>> Nevertheless, we seem to have a problem as "tail -nBAZOOM" gives me
>> Illegal option: -nBAZOOM
>> This means we don't handle well malformed args.
>
> It looks more like tail.clo is wrong.
>
--
Mikoláš Janota M. Sc.
School of Computer Science and Informatics,
University College Dublin,
Belfield,
Dublin 4,
Ireland
|