mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-27 18:42:20 +00:00
0.7.0 release
This commit is contained in:
28
CHANGELOG.md
28
CHANGELOG.md
@@ -1,11 +1,35 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.7.0 (2019-08-14)
|
||||||
|
|
||||||
|
The repository has been moved to a [new location](https://github.com/luarocks/argparse).
|
||||||
|
|
||||||
|
### New features
|
||||||
|
|
||||||
|
* Added support for generating shell completion scripts for Bash, Zsh, and Fish
|
||||||
|
using the Parser methods `:get_bash_complete()`, `:get_zsh_complete()`, and
|
||||||
|
`:get_fish_complete()`. The Parser methods `:add_complete()` and
|
||||||
|
`:add_complete_command()` add a `--completion` option or `completion` command
|
||||||
|
to the parser.
|
||||||
|
* Added `:add_help_command()` method to Parser and Command objects. The help
|
||||||
|
command shows help for the specified subcommand.
|
||||||
|
* Added `choices` option and argument property for specifying a set of
|
||||||
|
acceptable values for the argument.
|
||||||
|
* Added `summary` command property for specifying the description shown in the
|
||||||
|
parent parser's help message.
|
||||||
|
|
||||||
|
### Improvements
|
||||||
|
|
||||||
|
* The location of the help flag in usage and help messages is now determined by
|
||||||
|
when it is added to the parser, rather than always being the last option. By
|
||||||
|
default it is now the first option.
|
||||||
|
|
||||||
## 0.6.0 (2018-04-13)
|
## 0.6.0 (2018-04-13)
|
||||||
|
|
||||||
### New features
|
### New features
|
||||||
|
|
||||||
* An array of functions can now be as the value of `converter` property,
|
* An array of functions can now be used as the value of `converter` property,
|
||||||
so that multi-argumnet options can use different conversion rules
|
so that multi-argument options can use different conversion rules
|
||||||
for different arguments (#14).
|
for different arguments (#14).
|
||||||
* Mutexes can now include positional arguments (#11).
|
* Mutexes can now include positional arguments (#11).
|
||||||
* Added `hidden` property for arguments, options and commands,
|
* Added `hidden` property for arguments, options and commands,
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Argparse is a feature-rich command line parser for Lua inspired by argparse for Python.
|
Argparse is a feature-rich command line parser for Lua inspired by argparse for Python.
|
||||||
|
|
||||||
Argparse supports positional arguments, options, flags, optional arguments, subcommands and more. Argparse automatically generates usage, help and error messages.
|
Argparse supports positional arguments, options, flags, optional arguments, subcommands and more. Argparse automatically generates usage, help, and error messages, and can generate shell completion scripts.
|
||||||
|
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@ source = {
|
|||||||
}
|
}
|
||||||
description = {
|
description = {
|
||||||
summary = "A feature-rich command-line argument parser",
|
summary = "A feature-rich command-line argument parser",
|
||||||
detailed = "Argparse supports positional arguments, options, flags, optional arguments, subcommands and more. Argparse automatically generates usage, help and error messages.",
|
detailed = "Argparse supports positional arguments, options, flags, optional arguments, subcommands and more. Argparse automatically generates usage, help, and error messages, and can generate shell completion scripts.",
|
||||||
homepage = "https://github.com/luarocks/argparse",
|
homepage = "https://github.com/luarocks/argparse",
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
}
|
}
|
||||||
|
@@ -51,9 +51,9 @@ copyright = u'2013 - 2018, Peter Melnichenko'
|
|||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.6.0'
|
version = '0.7.0'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.6.0'
|
release = '0.7.0'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
@@ -2069,7 +2069,7 @@ end
|
|||||||
|
|
||||||
local argparse = {}
|
local argparse = {}
|
||||||
|
|
||||||
argparse.version = "0.6.0"
|
argparse.version = "0.7.0"
|
||||||
|
|
||||||
setmetatable(argparse, {__call = function(_, ...)
|
setmetatable(argparse, {__call = function(_, ...)
|
||||||
return Parser(default_cmdline[0]):add_help(true)(...)
|
return Parser(default_cmdline[0]):add_help(true)(...)
|
||||||
|
Reference in New Issue
Block a user