1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-30 20:53:52 +00:00

Adding some updates to changelog and readme

This commit is contained in:
Henry Fredrick Schreiner 2019-01-03 09:36:24 +01:00
parent a83109002c
commit f49447c590
2 changed files with 14 additions and 7 deletions

View File

@ -1,13 +1,18 @@
## Version 1.7.0: Parse breakup
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.
Passing the same subcommand multiple times is better supported.
Passing the same subcommand multiple times is better supported. A new feature, `ignore_underscore` was added, as well, to ignore underscores in names.
* Subcommands now track how many times they were parsed in a parsing process. `count()` with no arguments will return the number of times a subcommand was encountered.
* Parsing is now done in phases: `shortcurcuits`, `ini`, `env`, `callbacks`, and `requirements`; all subcommands complete a phase before moving on.
* Calling parse multiple times is now officially supported without `clear` (automatic).
* Dropped the mostly undocumented `short_curcuit` property, as help flag parsing is a bit more complex, and the default callback behavior of options now works properly.
* Added `ignore_underscore` and related functions, to ignore underscores when matching names. [#185]
* Subcommands now track how many times they were parsed in a parsing process. `count()` with no arguments will return the number of times a subcommand was encountered. [#179]
* Parsing is now done in phases: `shortcurcuits`, `ini`, `env`, `callbacks`, and `requirements`; all subcommands complete a phase before moving on. [#179]
* Calling parse multiple times is now officially supported without `clear` (automatic). [#179]
* Dropped the mostly undocumented `short_curcuit` property, as help flag parsing is a bit more complex, and the default callback behavior of options now works properly. [#179]
* Use the standard `BUILD_TESTING` over `CLI11_TESTING` if defined (`CLI11_TESTING` may eventually be removed) [#183]
[#179]: https://github.com/CLIUtils/CLI11/pull/179
[#183]: https://github.com/CLIUtils/CLI11/pull/183
[#185]: https://github.com/CLIUtils/CLI11/pull/185
## Version 1.6.2: Help-all

View File

@ -264,7 +264,7 @@ everything after that is positional only.
### Subcommands
Subcommands are supported, and can be nested infinitely. To add a subcommand, call the `add_subcommand` method with a name and an optional description. This gives a pointer to an `App` that behaves just like the main app, and can take options or further subcommands. Add `->ignore_case()` to a subcommand to allow any variation of caps to also be accepted. Children inherit the current setting from the parent. You cannot add multiple matching subcommand names at the same level (including ignore
Subcommands are supported, and can be nested infinitely. To add a subcommand, call the `add_subcommand` method with a name and an optional description. This gives a pointer to an `App` that behaves just like the main app, and can take options or further subcommands. Add `->ignore_case()` to a subcommand to allow any variation of caps to also be accepted. `->ignore_underscore()` is similar, but for underscores. Children inherit the current setting from the parent. You cannot add multiple matching subcommand names at the same level (including ignore
case).
If you want to require that at least one subcommand is given, use `.require_subcommand()` on the parent app. You can optionally give an exact number of subcommands to require, as well. If you give two arguments, that sets the min and max number allowed.
@ -345,7 +345,7 @@ arguments, use `.config_to_str(default_also=false, prefix="", write_description=
### Inheriting defaults
Many of the defaults for subcommands and even options are inherited from their creators. The inherited default values for subcommands are `allow_extras`, `prefix_command`, `ignore_case`, `fallthrough`, `group`, `footer`, and maximum number of required subcommands. The help flag existence, name, and description are inherited, as well.
Many of the defaults for subcommands and even options are inherited from their creators. The inherited default values for subcommands are `allow_extras`, `prefix_command`, `ignore_case`, `ignore_underscore`, `fallthrough`, `group`, `footer`, and maximum number of required subcommands. The help flag existence, name, and description are inherited, as well.
Options have defaults for `group`, `required`, `multi_option_policy`, `ignore_underscore`, and `ignore_case`. To set these defaults, you should set the `option_defaults()` object, for example:
@ -467,6 +467,8 @@ Significant features and/or improvements to the code were contributed by:
- [Stéphane Del Pino](https://github.com/delpinux)
- [Mak Kolybabi](https://github.com/mogigoma)
- [Paweł Bylica](https://github.com/chfast)
- [Philip Top](https://github.com/phlptp)
- [almikhayl](https://github.com/almikhayl)
## License