Download Latest Version argparse4j-0.5.0.jar (83.8 kB)
Email in envelope

Get an email when there's a new version of argparse4j

Home / argparse4j-0.3.1
Name Modified Size InfoDownloads / Week
Parent folder
README.rst 2013-01-26 3.2 kB
argparse4j-0.3.1-javadoc.jar 2013-01-26 334.1 kB
argparse4j-0.3.1.jar 2013-01-26 72.4 kB
argparse4j-0.3.1-sources.jar 2013-01-26 78.0 kB
Totals: 4 Items   487.6 kB 0

argparse4j 0.3.1

Release Note

This release fixes formatting bug when an empty string argument is involved. The additional help message is now printed for non-flag unrecognized arguments coming from file.

Changes

  • Print additional message for non-flag unrecognized arguments

  • Fix TextHelper.concat() bug

    The bug makes TextHelper.concat(new String[] {""}, 0, ",") produce "," instead of "". Also now Collection version can handle offset argument properly.

argparse4j 0.3.0

Release Note

This release adds terminal width detection, Arguments.fileType() conversion and mutually exclusive group support. Now Argument#help() can take FeatureControl#SUPPRESS to hide certain options from help message. The convenient method ArgumentParser#parseArgsOrFail() was added, which handles errors and exits the program.

Changes

  • Format error message according to column width in ArguemtnParserImpl#handleError()

  • Add public static ArgumentParsers.DEFAULT_PREFIX_CHARS

    It is the default value of prefixChars which can be passed to ArgumentParsers.newArgumentParser().

  • Add additional help message for unrecognized args from file

    If trailing empty lines or white spaces exist in argument file accidentally, the error message is typically only "unrecognized arguments" and it may be hard to notice that the problem is in a file. To help the user in this situation, if the unrecognized argument was coming from a file, add additional help message to the exception message to alert user that the problem may exist in argument file. This change also quotes unrecognized arguments in exception message.

  • Add "hidden" argument support

    If Argument#help(FeatureControl) is invoked with parameter Arguments.SUPPRESS, the help entry of that option will not be displayed.

  • Don't print trailing white spaces when no argument help is provided

  • Added shortcut method to parse arguments and handle errors

    Contributed by Juan Manuel Caicedo Carvajal.

  • Fix bug that type conversion is not called with nargs and embedded value

  • Ability to detect terminal width

    If terminal width was detected, then use it to format help and usage messages. The terminal width can be retrieved using ArgumentParsers#getFormatWidth() if application code needs it. The code to detect terminal width was contributed by Wolfgang Hoschek.

  • Add ArgumentType subclass for File type, using fluent style API

    It can be accessed using Arguments.fileType(). Contributed by Wolfgang Hoschek.

  • Add mutually exclusive argument support

    The mutually exclusive group can be added using ArgumentParser#addMutuallyExclusiveGroup. The returned object from this method implements MutuallyExclusiveGroup interface. It has similar interface with ArgumentGroup, but it additionally has required() method, which toggles the restriction that one of the argument in this group must be specified or not. Usually, more than 1 argument are added to mutually exclusive group and only one of them can be specified. The arguments are specially formatted in usage and help messages.

Source: README.rst, updated 2013-01-26