Skip to content

Commit 6f28a24

Browse files
committed
0.7.0 release
1 parent f72c10d commit 6f28a24

File tree

5 files changed

+31
-7
lines changed

5 files changed

+31
-7
lines changed

CHANGELOG.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,35 @@
11
# Changelog
22

3+
## 0.7.0 (2019-08-14)
4+
5+
The repository has been moved to a [new location](https://github.com/luarocks/argparse).
6+
7+
### New features
8+
9+
* Added support for generating shell completion scripts for Bash, Zsh, and Fish
10+
using the Parser methods `:get_bash_complete()`, `:get_zsh_complete()`, and
11+
`:get_fish_complete()`. The Parser methods `:add_complete()` and
12+
`:add_complete_command()` add a `--completion` option or `completion` command
13+
to the parser.
14+
* Added `:add_help_command()` method to Parser and Command objects. The help
15+
command shows help for the specified subcommand.
16+
* Added `choices` option and argument property for specifying a set of
17+
acceptable values for the argument.
18+
* Added `summary` command property for specifying the description shown in the
19+
parent parser's help message.
20+
21+
### Improvements
22+
23+
* The location of the help flag in usage and help messages is now determined by
24+
when it is added to the parser, rather than always being the last option. By
25+
default it is now the first option.
26+
327
## 0.6.0 (2018-04-13)
428

529
### New features
630

7-
* An array of functions can now be as the value of `converter` property,
8-
so that multi-argumnet options can use different conversion rules
31+
* An array of functions can now be used as the value of `converter` property,
32+
so that multi-argument options can use different conversion rules
933
for different arguments (#14).
1034
* Mutexes can now include positional arguments (#11).
1135
* Added `hidden` property for arguments, options and commands,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
Argparse is a feature-rich command line parser for Lua inspired by argparse for Python.
77

8-
Argparse supports positional arguments, options, flags, optional arguments, subcommands and more. Argparse automatically generates usage, help and error messages.
8+
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.
99

1010
## Contents
1111

argparse-scm-2.rockspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source = {
55
}
66
description = {
77
summary = "A feature-rich command-line argument parser",
8-
detailed = "Argparse supports positional arguments, options, flags, optional arguments, subcommands and more. Argparse automatically generates usage, help and error messages.",
8+
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.",
99
homepage = "https://github.com/luarocks/argparse",
1010
license = "MIT"
1111
}

docsrc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
# built documents.
5252
#
5353
# The short X.Y version.
54-
version = '0.6.0'
54+
version = '0.7.0'
5555
# The full version, including alpha/beta/rc tags.
56-
release = '0.6.0'
56+
release = '0.7.0'
5757

5858
# The language for content autogenerated by Sphinx. Refer to documentation
5959
# for a list of supported languages.

src/argparse.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2069,7 +2069,7 @@ end
20692069

20702070
local argparse = {}
20712071

2072-
argparse.version = "0.6.0"
2072+
argparse.version = "0.7.0"
20732073

20742074
setmetatable(argparse, {__call = function(_, ...)
20752075
return Parser(default_cmdline[0]):add_help(true)(...)

0 commit comments

Comments
 (0)