1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-03 14:03:52 +00:00

Adding a little info to the docs

This commit is contained in:
Henry Fredrick Schreiner 2017-11-20 09:21:35 -05:00 committed by Henry Schreiner
parent 077ba40417
commit 15c86072a6
2 changed files with 3 additions and 0 deletions

View File

@ -132,6 +132,8 @@ app.add_set(option_name,
app.add_set_ignore_case(... // String only app.add_set_ignore_case(... // String only
app.add_help_flag(name, optional_discription);
App* subcom = app.add_subcommand(name, discription); App* subcom = app.add_subcommand(name, discription);
``` ```

View File

@ -331,6 +331,7 @@ class App {
return opt; return opt;
} }
/// Add a help flag, currently throws an error if already set
Option *add_help_flag(std::string name, std::string description = "") { Option *add_help_flag(std::string name, std::string description = "") {
if(help_ptr_) if(help_ptr_)
throw IncorrectConstruction("Help flag already initialized"); throw IncorrectConstruction("Help flag already initialized");