CLI11
CLI11 copied to clipboard
Option to hide the default value in the help text
When I set a flag like this:
app.add_flag("--hidden,!--no-hidden", showHiddenFiles, "Show or hide hidden files");
the resulting help text looks like this:
--hidden, --no-hidden{false} Show or hide hidden files
It would be nice to have the ability to hide the {false} part. I did not find such an option in the docs/code. Also using a custom formatter doesn't seem to help, since this behaviour is defined in std::string Option::get_name(bool positional, bool all_options).
The intention was that the option name output should be such that it could be fed into add_option and it would register the same. So no modifiers to hide the {false} part were not considered as they would break that symmetry. Though this may be something we want have a means of doing via a custom formatter of some sort.