diff --git a/README.md b/README.md index 053599cf..0a993c45 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,8 @@ app.add_set(option_name, app.add_set_ignore_case(... // String only +app.add_help_flag(name, optional_discription); + App* subcom = app.add_subcommand(name, discription); ``` diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index e0bd850e..d6538c8f 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -331,6 +331,7 @@ class App { return opt; } + /// Add a help flag, currently throws an error if already set Option *add_help_flag(std::string name, std::string description = "") { if(help_ptr_) throw IncorrectConstruction("Help flag already initialized");