Skip to content

Commit 97f5730

Browse files
committed
Preparing for 1.7
1 parent 02c4938 commit 97f5730

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 1.7: Parse breakup (in progress)
1+
## Version 1.7: Parse breakup
22

33
The parsing procedure now maps much more sensibly to complex, nested subcommand structures. Each phase of the parsing happens on all subcommands before moving on with the next phase of the parse. This allows several features, like required environment variables, to work properly even through subcommand boundaries.
44
Passing the same subcommand multiple times is better supported. Several new features were added as well, including Windows style option support, parsing strings directly, and ignoring underscores in names. Adding a set that you plan to change later must now be done with `add_mutable_set`.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,17 @@ app.add_flag_function(option_name,
190190
help_string="")
191191

192192
app.add_set(option_name,
193-
variable_to_bind_to,
194-
set_of_possible_options,
193+
variable_to_bind_to, // Same type as stored by set
194+
set_of_possible_options, // Set will be copied, ignores changes
195195
help_string="",
196196
default=false)
197197
app.add_mutable_set(... // Set can change later, keeps reference
198198

199-
app.add_set_ignore_case(... // String only
200-
app.add__mutable_set_ignore_case(... // String only
201-
app.add_set_ignore_underscore(... // String only
202-
app.add__mutable_set_ignore_underscore(... // String only
203-
app.add_set_ignore_case_underscore(... // String only
199+
app.add_set_ignore_case(... // String only
200+
app.add_mutable_set_ignore_case(... // String only
201+
app.add_set_ignore_underscore(... // String only
202+
app.add_mutable_set_ignore_underscore(... // String only
203+
app.add_set_ignore_case_underscore(... // String only
204204
app.add_mutable_set_ignore_case_underscore(... // String only
205205

206206
App* subcom = app.add_subcommand(name, description);
@@ -234,7 +234,7 @@ Before parsing, you can set the following options:
234234
- `->group(name)`: The help group to put the option in. No effect for positional options. Defaults to `"Options"`. `""` will not show up in the help print (hidden).
235235
- `->ignore_case()`: Ignore the case on the command line (also works on subcommands, does not affect arguments).
236236
- `->ignore_underscore()`: Ignore any underscores in the options names (also works on subcommands, does not affect arguments). For example "option_one" will match with optionone. This does not apply to short form options since they only have one character
237-
- `.description(str)`: Set/change the description.
237+
- `->description(str)`: Set/change the description.
238238
- `->multi_option_policy(CLI::MultiOptionPolicy::Throw)`: Set the multi-option policy. Shortcuts available: `->take_last()`, `->take_first()`, and `->join()`. This will only affect options expecting 1 argument or bool flags (which always default to take last).
239239
- `->check(CLI::ExistingFile)`: Requires that the file exists if given.
240240
- `->check(CLI::ExistingDirectory)`: Requires that the directory exists.

0 commit comments

Comments
 (0)