Skip to content

Commit

Permalink
Updates to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed May 3, 2018
1 parent b30e479 commit ac0205d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Version 1.6: Formatting
### Version 1.6: Formatting help

Added a new formatting system. [#109] You can now set the formatter on Apps.

Expand All @@ -17,10 +17,18 @@ Changes to the help system (most normal users will not notice this):
* Protected function `_has_help_positional` removed
* `format_help` can now be chained

Validators are now much more powerful [#118], all build in validators upgraded to the new form:

* A subclass of `CLI::Validator` is now also accepted.
* They now can set the type name to things like `PATH` and `INT in [1-4]`.
* Validators can be combined with `&` and `|`.
* Old form simple validators are still accepted.

Other changes:

* Using `add_set` will now capture L-values for sets, allowing further modification [#113]
* Internally, `type_name` is now a lambda function; for sets, this reads the set live [#116]
* Dropped duplicate way to run `get_type_name` (`get_typeval`)
* Testing (only) now uses submodules. [#111]
* Removed `requires` in favor of `needs` (deprecated in last version) [#112]
* Better CMake policy handling [#110]
Expand All @@ -30,6 +38,8 @@ Other changes:
[#111]: https://github.com/CLIUtils/CLI11/pull/111
[#112]: https://github.com/CLIUtils/CLI11/pull/112
[#113]: https://github.com/CLIUtils/CLI11/issues/113
[#116]: https://github.com/CLIUtils/CLI11/pull/116
[#118]: https://github.com/CLIUtils/CLI11/pull/118

### Version 1.5.3: Compiler compatibility
This version fixes older AppleClang compilers by removing the optimization for casting. The minimum version of Boost Optional supported has been clarified to be 1.58. CUDA 7.0 NVCC is now supported.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ The add commands return a pointer to an internally stored `Option`. If you set t
* `->transform(std::string(std::string))`: Converts the input string into the output string, in-place in the parsed options.
* `->configurable(false)`: Disable this option from being in an ini configuration file.

These options return the `Option` pointer, so you can chain them together, and even skip storing the pointer entirely. Check takes any function that has the signature `void(const std::string&)`; it should throw a `ValidationError` when validation fails. The help message will have the name of the parent option prepended. Since `check` and `transform` use the same underlying mechanism, you can chain as many as you want, and they will be executed in order. If you just want to see the unconverted values, use `.results()` to get the `std::vector<std::string>` of results.
These options return the `Option` pointer, so you can chain them together, and even skip storing the pointer entirely. Check takes any function that has the signature `void(const std::string&)`; it should throw a `ValidationError` when validation fails. The help message will have the name of the parent option prepended. Since `check` and `transform` use the same underlying mechanism, you can chain as many as you want, and they will be executed in order. If you just want to see the unconverted values, use `.results()` to get the `std::vector<std::string>` of results. Validate can also be a subclass of `CLI::Validator`, in which case it can also set the type name and can be combined with `&` and `|` (all built-in validators are this sort).


On the command line, options can be given as:
Expand Down

0 comments on commit ac0205d

Please sign in to comment.