On 30/05/2009, James Ring <s...@jdns.org> wrote: > Hey, > > > On Sat, May 30, 2009 at 11:30 AM, Emmanuel Bourg <ebo...@apache.org> wrote: > > Russel Winder a écrit : > > > >>> It implements the features of the other parsers and more: > >>> - partial matching for the long options (-ver instead of -version) > >> > >> What about -ver being -v -e -r ? > > > > The partial matching of a long option has the priority over the > > decomposition of the short options. > > > > If you have the following options: > > > > -v,--verbose > > -e > > -r,--recursive > > > > then: > > > > 1. -ver will be parsed as -v (partial matching of 'verbose') > > 2. -rev will be parsed as -r -e -v (decomposition) > > > > > > I wonder if I should add some settings to control the behavior of the > > parser. For example, to disable the decomposition of the short options, > > or to disable the partial matching of the long options starting with a > > single dash (i.e --ver would still stand for --verbose, but not -ver). > > > I think partial matching should be disabled by default. While a neat > feature to reduce typing, this behaviour will probably come as a > surprise to people because it is not found in most programs. Also, if > an option is not completely specified, I know I'd like the program to > crash rather than run but do something that I don't expect.
+1 > > Emmanuel Bourg > > Regards, > > James > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org