From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-11-24 09:14:03
Caleb Epstein wrote:
> On Wed, 24 Nov 2004 10:27:59 +0300, Vladimir Prus <ghost_at_[hidden]> wrote:
>> Ok, let me start with a caveat: ignoring unknown options can be
>> program --something 10 --known_option
>> Now, is "10" a value of unknown option or positional option? To remove
>> the problems all unknown options must use this form:
>> which may be problem, or may not, depending on your situation. What do
>> you think?
> I think it is unreasonable to expect all command lines to be specified
> in this way. If --something expects an argument, then 10 is that
Well, I obvious don't know if an unknown option expects an argument ;-)
> If --something is a flag then its either an unknown
> or (if you allow argument vector rearranging ala GNU getopt)
> it is the first positional parameter.
While it's possible to consider all unknown options to be positional
options, this still leaves the question what to do with "10". Should it be
passed to the application as position option?
> Allowing unknown options to be ignored is a very desirable feature,
> though it should be disabled by default.
I just don't see any solution to make unknown options work without either
-- requiring --something=10 format
-- requiring that all positional options are at the end
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk