Commit 97f5730979f7825df652f286a704d07a0c22651b

Authored by Henry Fredrick Schreiner
1 parent 02c49388

Preparing for 1.7

Showing 2 changed files with 9 additions and 9 deletions
CHANGELOG.md
1   -## Version 1.7: Parse breakup (in progress)
  1 +## Version 1.7: Parse breakup
2 2  
3 3 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.
4 4 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
... ... @@ -190,17 +190,17 @@ app.add_flag_function(option_name,
190 190 help_string="")
191 191  
192 192 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
195 195 help_string="",
196 196 default=false)
197 197 app.add_mutable_set(... // Set can change later, keeps reference
198 198  
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
204 204 app.add_mutable_set_ignore_case_underscore(... // String only
205 205  
206 206 App* subcom = app.add_subcommand(name, description);
... ... @@ -234,7 +234,7 @@ Before parsing, you can set the following options:
234 234 - `->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).
235 235 - `->ignore_case()`: Ignore the case on the command line (also works on subcommands, does not affect arguments).
236 236 - `->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.
238 238 - `->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).
239 239 - `->check(CLI::ExistingFile)`: Requires that the file exists if given.
240 240 - `->check(CLI::ExistingDirectory)`: Requires that the directory exists.
... ...