diff --git a/CHANGELOG.md b/CHANGELOG.md index 52b10e85..6616b779 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ * Added `CLI::ArgumentMismatch` [#56](https://github.com/CLIUtils/CLI11/pull/56) and fixed missing failure if one arg expected [#55](https://github.com/CLIUtils/CLI11/issues/55) * Support for minimum unlimited expected arguments [#56](https://github.com/CLIUtils/CLI11/pull/56) * Single internal arg parse function [#56](https://github.com/CLIUtils/CLI11/pull/56) +* Allow options to be disabled from INI file [#60](https://github.com/CLIUtils/CLI11/pull/60) ## Version 1.2 diff --git a/README.md b/README.md index 7ccc5a15..034e61b8 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,7 @@ The add commands return a pointer to an internally stored `Option`. If you set t * `->check(CLI::NonexistentPath)`: Requires that the path does not exist. * `->check(CLI::Range(min,max))`: Requires that the option be between min and max (make sure to use floating point if needed). Min defaults to 0. * `->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` of results.