Breaking change: The
allowTrailingOptions argument to
new ArgumentParser() defaults to
true instead of
new ArgParser.allowAnything(). This allows any input, without parsing any options.
Add explicit support for forwarding the value returned by
CommandRunner.run(). This worked unintentionally prior to 0.13.6+1.
Add type arguments to
Command to indicate the return values of the
--helpbefore any commands, it now prints the usage of the chosen command.
ArgParser.parse() now throws an
ArgParserException, which implements
FormatException and has a field that lists the commands that were parsed.
CommandRunner.run() encounters a parse error for a subcommand, it now prints the subcommand's usage rather than the global usage.
Command.argParserto be overridden in strong mode.
By default, only the first line of a command‘s description is included in its parent runner’s usage string. This returns to the default behavior from before 0.13.3+1.
Command.summary getter has been added to explicitly control the summary that appears in the parent runner's usage string. This getter defaults to the first line of the description, but can be overridden if the user wants a multi-line summary.
usagegetter in the README.
new ArgParser(). This doesn't change the behavior at all; the option already defaulted to
false, and passing in
getopt, the de facto standard for option parsing.
ArgParser.addSeparator(). Separators allow users to group their options in the usage text.
Updated dependency constraint on
Formatted source code.
Fixed use of deprecated API in example.
Command classes which make it easy to build a command-based command-line application.
ArgResults.arguments field, which contains the original argument list.
ArgParser.usage, a getter.
ArgParser.getUsage()is now deprecated, to be removed in args version 1.0.0.
Removed public constructors for
ArgResults.wasParsed() can be used to determine if an option was actually parsed or the default value is being returned.
allowMultiple fields in the
Option class with a three-value
Options may define
valueHelp which will then be shown in the usage.
ArgParseritself. This lets subcommands have different behavior for how they handle trailing options.