|
Boost : |
From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2004-11-24 09:59:30
On Wed, 24 Nov 2004 17:14:03 +0300, Vladimir Prus <ghost_at_[hidden]> wrote:
> Well, I obvious don't know if an unknown option expects an argument ;-)
>
> 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
What about the combination of (if some user-settable switch is thrown,
but not by default):
* allowing unknown options -- these are considered positional parameters
* rearranging the argument list such that all positional parameters
are moved to the end
This way:
program --unknown 42 --known-flag --known-arg value
is handled as if it were (in standard UNIX command-line-ese):
program --known-flag --known-arg value -- --unknown 42
-- Caleb Epstein caleb dot epstein at gmail dot com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk