allowTrailingOptions
parameter to new ArgParser()
. This doesn't change the behavior at all; the option already defaulted to false
, and passing in null
still works.getopt
, the de facto standard for option parsing.ArgParser.addSeparator()
. Separators allow users to group their options in the usage text.splitCommas
option.collection
package.Updated dependency constraint on unittest
.
Formatted source code.
Fixed use of deprecated API in example.
help
command for CommandRunner
.Add CommandRunner
and Command
classes which make it easy to build a command-based command-line application.
Add an ArgResults.arguments
field, which contains the original argument list.
ArgParser.getUsage()
with ArgParser.usage
, a getter. ArgParser.getUsage()
is now deprecated, to be removed in args version 1.0.0.collection
package.Removed public constructors for ArgResults
and Option
.
ArgResults.wasParsed()
can be used to determine if an option was actually parsed or the default value is being returned.
Replaced isFlag
and allowMultiple
fields in the Option
class with a three-value OptionType
enum.
Options may define valueHelp
which will then be shown in the usage.
ArgParser.parse()
into ArgParser
itself. This lets subcommands have different behavior for how they handle trailing options.