Skip to content

Releases: mpeterv/argparse

argparse 0.6.0

13 Apr 19:17
Compare
Choose a tag to compare

New features:

  • An array of functions can now be as the value of convert property,
    so that multi-argument options can use different conversion rules
    for different arguments (#14).
  • Mutexes can now include positional arguments (#11).
  • Added hidden property for arguments, options and commands,
    removing them from the autogenerated usage and help strings.
  • Added :group(name, ...) method to Parser and Command objects, allowing
    custom grouping of arguments, options, and commands in autogenerated
    help string.
  • Added help_vertical_space property for configuring number of extra
    newlines between help strings for different arguments and options in
    autogenerated help string.
  • Added usage_margin and usage_max_width properties for configuring
    usage string autogeneration.
  • Added help_usage_margin and help_description_margin properties
    for configuring help string autogeneration.
  • Added help_max_width property. If set, descriptions in help string
    are automatically wrapped to fit into given number of columns.
  • Argparse version is now available as argparse.version.

Improvements:

  • -- can now be used as a normal option name, with arguments
    after -- always passed to it verbatim (#17).
  • When generating help messages for options with arguments and multiple
    aliases, usage strings for different aliases are put on separate lines and
    vertically aligned (#15).

argparse 0.5.0

09 Dec 11:28
Compare
Choose a tag to compare
  • Actions can now be used to implement custom processing logic.
  • Added actions for arguments.
  • Added string aliases for actions such as store_false.
  • Command actions are now called after the parsing, with result target as the argument.
  • Added command_target property for storing name of used command.
  • Improved error messages on missing arguments.
  • -f123 is now interpreted as -f 123 when -f takes an optional argument.

argparse 0.4.1

08 Aug 20:36
Compare
Choose a tag to compare

Added license header to argparse.lua for ease of bundling and packaging.

argparse 0.4.0

20 Jun 15:59
Compare
Choose a tag to compare
  • Breaking: removed aliases property, aliases can now be set using several space separated strings as name, or, as it was possible before, by setting name property several times.
  • Often used properties now can be passed as arguments when calling or constructing an element.
  • Added handle_options property, thanks @Alloyed.
  • Cleaned up whitespace in generated messages.

argparse 0.3.2

15 Jan 13:34
Compare
Choose a tag to compare
0.3.2 release

argparse 0.3.1

06 Nov 14:24
Compare
Choose a tag to compare
  • Fixed incompatibility with old Luarocks versions.

argparse 0.3.0

25 Aug 10:32
Compare
Choose a tag to compare
  • Fixed incompatibility with strict.lua and other checkers, thanks to @stepelu.
  • Fixed usage message generation to show options taking variable number of arguments after positional arguments, thanks to @kikito.
  • In default targets - is now replaced with _.
  • New show_default field disables automatic indication of default values in help messages.

argparse 0.2.0

09 Mar 11:27
Compare
Choose a tag to compare
  • Bugfix: fixed script name inference not working for Parser:get_help() and Parser:get_usage() methods.
  • New feature: added mutually exclusive groups.
  • New feature: options and arguments can now be configured to use different argument placeholders for first, second, etc. arguments. E.g. --pair <key> <value>.

argparse 0.1.0

02 Mar 15:40
Compare
Choose a tag to compare
Preparing for 0.1.0 release