From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-05-07 06:47:49
On Fri, May 07, 2004 at 10:56:25AM +0400, Vladimir Prus wrote:
> Neal D. Becker wrote:
> > It's a small point, but here's my opinion. ?You say something like: "If
> > option requires a value and ?following -<number> doesn't match an option,
> > then parse it as an argument".
> > I would suggest "If option requires a value then parse *any* following
> > string, including -<number> as a value, unconditionally".
> So the different would be that
> -a -b
> where both "a" and "b" are allowed option and "-a" requires a value,
> will be reported as invalid value of option "-a" not as missing value on the
> command line? Why do you think that's better?
It's certainly what I'd expect, and what getopt() does IIRC.
Try "grep -B -a foo bar" and you get an error due to "-a" not being a
number (at least with GNU grep)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk