1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 20:23:55 +00:00

Update changelog and contributers

[skip ci]
This commit is contained in:
Henry Fredrick Schreiner 2019-05-18 06:40:10 +02:00
parent 59a36565fe
commit acee69a8cc
2 changed files with 13 additions and 5 deletions

View File

@ -1,11 +1,12 @@
## Version 1.8: Sets and Flags (IN PROGRESS) ## Version 1.8: Transformers, default strings, and flags
Set handling has been completely replaced by a new backend that works as a Validator. This provides a single interface instead of the 16 different functions in App. It also allows ordered collections to be used, custom functions for filtering, and better help and error messages. You can also use a collection of pairs (like `std::map`) to transform the match into an output. Also new are inverted flags, which can cancel or reduce the count of flags, and can also support general flag types. A new `add_option_fn` lets you more easily program CLI11 options with the types you choose. Vector options now support a custom separator. Apps can now be composed with unnamed subcommand support. The final bool "defaults" flag when creating options has been replaced by `->capture_default_str()` (ending an old limitation in construction made this possible); the old method is still available but may be removed in future versions. Set handling has been completely replaced by a new backend that works as a Validator or Transformer. This provides a single interface instead of the 16 different functions in App. It also allows ordered collections to be used, custom functions for filtering, and better help and error messages. You can also use a collection of pairs (like `std::map`) to transform the match into an output. Also new are inverted flags, which can cancel or reduce the count of flags, and can also support general flag types. A new `add_option_fn` lets you more easily program CLI11 options with the types you choose. Vector options now support a custom separator. Apps can now be composed with unnamed subcommand support. The final bool "defaults" flag when creating options has been replaced by `->capture_default_str()` (ending an old limitation in construction made this possible); the old method is still available but may be removed in future versions.
* Replaced default help capture: `.add_option("name", value, "", True)` becomes `.add_option("name", value)->capture_default_str()` [#242] * Replaced default help capture: `.add_option("name", value, "", True)` becomes `.add_option("name", value)->capture_default_str()` [#242]
* Added `.always_capture_default()` [#242] * Added `.always_capture_default()` [#242]
* New `CLI::IsMember` validator replaces set validation [#222] * New `CLI::IsMember` validator replaces set validation [#222]
* IsMember also supports container of pairs, transform allows modification of result [#228] * IsMember also supports container of pairs, transform allows modification of result [#228]
* Added new Transformers, `CLI::AsNumberWithUnit` and `CLI::AsSizeValue` [#253]
* Much more powerful flags with different values [#211], general types [#235] * Much more powerful flags with different values [#211], general types [#235]
* `add_option` now supports bool due to unified bool handling [#211] * `add_option` now supports bool due to unified bool handling [#211]
* Support for composable unnamed subcommands [#216] * Support for composable unnamed subcommands [#216]
@ -22,7 +23,7 @@ Set handling has been completely replaced by a new backend that works as a Valid
* Better alignment on multiline descriptions [#269] * Better alignment on multiline descriptions [#269]
* Better support for aarch64 [#266] * Better support for aarch64 [#266]
* Respect `BUILD_TESTING` only if CLI11 is the main project; otherwise, `CLI11_TESTING` must be used [#277] * Respect `BUILD_TESTING` only if CLI11 is the main project; otherwise, `CLI11_TESTING` must be used [#277]
* Drop auto-detection of experimental optional; must be enabled explicitly (too fragile) [#277] * Drop auto-detection of experimental optional and boost::optional; must be enabled explicitly (too fragile) [#277] [#279]
> ### Converting from CLI11 1.7: > ### Converting from CLI11 1.7:
> >
@ -52,11 +53,13 @@ Set handling has been completely replaced by a new backend that works as a Valid
[#242]: https://github.com/CLIUtils/CLI11/pull/242 [#242]: https://github.com/CLIUtils/CLI11/pull/242
[#247]: https://github.com/CLIUtils/CLI11/pull/247 [#247]: https://github.com/CLIUtils/CLI11/pull/247
[#251]: https://github.com/CLIUtils/CLI11/pull/251 [#251]: https://github.com/CLIUtils/CLI11/pull/251
[#253]: https://github.com/CLIUtils/CLI11/pull/253
[#262]: https://github.com/CLIUtils/CLI11/pull/262 [#262]: https://github.com/CLIUtils/CLI11/pull/262
[#265]: https://github.com/CLIUtils/CLI11/pull/265 [#265]: https://github.com/CLIUtils/CLI11/pull/265
[#266]: https://github.com/CLIUtils/CLI11/pull/266 [#266]: https://github.com/CLIUtils/CLI11/pull/266
[#269]: https://github.com/CLIUtils/CLI11/pull/269 [#269]: https://github.com/CLIUtils/CLI11/pull/269
[#277]: https://github.com/CLIUtils/CLI11/pull/277 [#277]: https://github.com/CLIUtils/CLI11/pull/277
[#279]: https://github.com/CLIUtils/CLI11/pull/279
## Version 1.7.1: Quick patch ## Version 1.7.1: Quick patch

View File

@ -341,8 +341,8 @@ CLI11 has several Validators built-in that perform some common checks
- `CLI::IsMember(...)`: 🚧 Require an option be a member of a given set. See [Transforming Validators](#transforming-validators) for more details. - `CLI::IsMember(...)`: 🚧 Require an option be a member of a given set. See [Transforming Validators](#transforming-validators) for more details.
- `CLI::Transformer(...)`: 🚧 Modify the input using a map. See [Transforming Validators](#transforming-validators) for more details. - `CLI::Transformer(...)`: 🚧 Modify the input using a map. See [Transforming Validators](#transforming-validators) for more details.
- `CLI::CheckedTransformer(...)`: 🚧 Modify the input using a map, and require that the input is either in the set or already one of the outputs of the set. See [Transforming Validators](#transforming-validators) for more details. - `CLI::CheckedTransformer(...)`: 🚧 Modify the input using a map, and require that the input is either in the set or already one of the outputs of the set. See [Transforming Validators](#transforming-validators) for more details.
- `CLI::AsNumberWithUnit(...)`: Modify the `<NUMBER> <UNIT>` pair by matching the unit and multiplying the number by the corresponding factor. It can be used as a base for transformers, that accept things like size values (`1 KB`) or durations (`0.33 ms`). - `CLI::AsNumberWithUnit(...)`:🚧 Modify the `<NUMBER> <UNIT>` pair by matching the unit and multiplying the number by the corresponding factor. It can be used as a base for transformers, that accept things like size values (`1 KB`) or durations (`0.33 ms`).
- `CLI::AsSizeValue(...)`: Convert inputs like `100b`, `42 KB`, `101 Mb`, `11 Mib` to absolute values. `KB` can be configured to be interpreted as 10^3 or 2^10. - `CLI::AsSizeValue(...)`: 🚧 Convert inputs like `100b`, `42 KB`, `101 Mb`, `11 Mib` to absolute values. `KB` can be configured to be interpreted as 10^3 or 2^10.
- `CLI::ExistingFile`: Requires that the file exists if given. - `CLI::ExistingFile`: Requires that the file exists if given.
- `CLI::ExistingDirectory`: Requires that the directory exists. - `CLI::ExistingDirectory`: Requires that the directory exists.
- `CLI::ExistingPath`: Requires that the path (file or directory) exists. - `CLI::ExistingPath`: Requires that the path (file or directory) exists.
@ -788,6 +788,11 @@ Significant features and/or improvements to the code were contributed by:
- [ncihneg](https://github.com/ncihneg) <!-- Quoting strings in INI generation --> - [ncihneg](https://github.com/ncihneg) <!-- Quoting strings in INI generation -->
- [Fred Helmesjö](https://github.com/helmesjo) <!-- `->description()` --> - [Fred Helmesjö](https://github.com/helmesjo) <!-- `->description()` -->
- [Rafi Wiener](https://github.com/rafiw) <!-- INI, +ive validators and vector separators --> - [Rafi Wiener](https://github.com/rafiw) <!-- INI, +ive validators and vector separators -->
[elszon](https://github.com/elszon) <!-- Formatting in multiline string -->
[ryan4729](https://github.com/ryan4729) <!-- AArch64 support -->
[Andrew Hardin](https://github.com/andrew-hardin) <!-- Fixing two warnings -->
[Paul le Roux](https://github.com/pleroux0) <!-- Arch independent CMake Config -->
- [Viacheslav Kroilov](https://github.com/metopa) <!-- AsNumberWithUnit and AsSizeValue -->
## License ## License