File: CHANGELOG.md

package info (click to toggle)
lua-argparse 0.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 356 kB
  • sloc: python: 38; makefile: 15
file content (154 lines) | stat: -rw-r--r-- 4,675 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Changelog

## 0.7.1 (2020-07-08)

Tested with Lua 5.4

### New features

 * Hidden aliases can be added to an option or command by setting the
   `hidden_name` property


## 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)

### New features

* An array of functions can now be used as the value of `converter` 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).

## 0.5.0 (2015-12-09)

### New features

* 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.

### Improvements

* Improved error messages on missing arguments.
* `-f123` is now interpreted as `-f 123` when `-f` takes an optional argument.

## 0.4.1 (2015-08-08)

### Miscellaneous

* Added license header to `argparse.lua` for ease of bundling
  and packaging (#3).

## 0.4.0 (2015-06-20)

### Breaking changes

* 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.

### New features

* Added `handle_options` property (#2).
* Often used properties now can be passed as arguments when calling or
  constructing an element.

### Improvements

* Cleaned up trailing whitespace in generated messages.

## 0.3.2 (2015-01-15)

### Miscellaneous

* Argparse no longer bundles 30log.

## 0.3.1 (2014-11-06)

### Fixes

* Fixed incompatibility with old Luarocks versions.

## 0.3.0 (2014-08-25)

### New features

* New `show_default` field disables automatic indication of default values in
  help messages.

### Improvements

* In default targets `-` is now replaced with `_`.
* Changed usage message generation to show options taking variable number of
  arguments after positional arguments.

### Fixes

* Fixed incompatibility with strict.lua and other checkers (#1).

## 0.2.0 (2014-03-09)

### New features

* Added mutually exclusive groups.
* Options and arguments can now be configured to use different argument
  placeholders for first, second, etc. arguments. E.g. `--pair <key> <value>`.

### Fixes

* Fixed script name inference not working for `Parser:get_help()` and
  `Parser:get_usage()` methods.

## 0.1.0 (2014-03-02)

Initial release.