Message111691
It *would* be a backwards incompatible change. Currently, if I have a parser with both a "--foo" and a "--bar" option, and my user types "--foo --bar", they get an error saying that they were missing the argument to "--foo". Under your proposal, the "--foo" option will now silently consume the "--bar" option without an error. I know this is good from your perspective, but it would definitely break some of my scripts, and I imagine it would break other people's scripts as well.
As I keep saying, I'm happy to add your alternative parsing as an option (assuming you provide a patch), but I really don't think it's the right thing to do by default. Most command line programs don't have options that take other option-like things as arguments (which is the source of your problem), so in most command line programs, people want an error when they get an option they don't recognize or an option that's missing its argument. Under your proposal, more such errors will pass silently and will have to be caught by additional code in the script. |
|
Date |
User |
Action |
Args |
2010-07-27 09:37:41 | bethard | set | recipients:
+ bethard, eric.smith, r.david.murray, andersk, gdb, nelhage |
2010-07-27 09:37:41 | bethard | set | messageid: <1280223461.34.0.798585138576.issue9334@psf.upfronthosting.co.za> |
2010-07-27 09:37:39 | bethard | link | issue9334 messages |
2010-07-27 09:37:38 | bethard | create | |
|