commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Keyes <>
Subject RE: [CLI] Making Option Extensible
Date Wed, 24 Jul 2002 14:25:00 GMT

> I heard a rumor that Commons CLI does not support the GNU standards
> on CLI options.  GNU standards have already affected a large number
> of standard software options for UNIX based Oss, and it is a decently
> thought out standard.  The basic gist is this:
> --help
> -h

CLI does support GNU standards.  The examples above are both
supported.  The reason why the short option name in the constructor
takes a String is to support Posix standards e.g. -buildfile is the
'buildfile' option, not '-b -u -i -l -d -f -i -l -e' or '-b' with
an argument value of 'uildfile', or any combination.  The interface
could be changed to have methods that take chars which then delegate
to the String methods but its no big deal.

-John K

> The double-dash signifies a long option name, and any arguments for
> the option follow using spaces to separate them from the option name.
> The single-dash signifies a short option name (a single character),
> and any arguments follow directly after the option name.
> Examples of options with arguments:
> --definition foo=bar
> -Dfoo=bar
> --file myfile.xml
> -fmyfile.xml
> We can also combine a number of options after one dash:
> -hDf foo=bar myfile.xml
> All arguments are separated by a space, and are resolved in the order
> that the option is listed.
> Whether you support the decision to use GNU standards or not, they
> should
> not be ignored because they aren't Apache standards.
> I also would argue that the "Java" option style really has no standard.
> All options (short or long) have one dash, but there is no way to
> represent
> a more readable version of a short option or shortcut the typing for a
> long option.  They are what they are.
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message