Commit 15c86072a6dd0431d06dff4eb75d4082ab795073

Authored by Henry Fredrick Schreiner
Committed by Henry Schreiner
1 parent 077ba404

Adding a little info to the docs

README.md
@@ -132,6 +132,8 @@ app.add_set(option_name, @@ -132,6 +132,8 @@ app.add_set(option_name,
132 132
133 app.add_set_ignore_case(... // String only 133 app.add_set_ignore_case(... // String only
134 134
  135 +app.add_help_flag(name, optional_discription);
  136 +
135 App* subcom = app.add_subcommand(name, discription); 137 App* subcom = app.add_subcommand(name, discription);
136 ``` 138 ```
137 139
include/CLI/App.hpp
@@ -331,6 +331,7 @@ class App { @@ -331,6 +331,7 @@ class App {
331 return opt; 331 return opt;
332 } 332 }
333 333
  334 + /// Add a help flag, currently throws an error if already set
334 Option *add_help_flag(std::string name, std::string description = "") { 335 Option *add_help_flag(std::string name, std::string description = "") {
335 if(help_ptr_) 336 if(help_ptr_)
336 throw IncorrectConstruction("Help flag already initialized"); 337 throw IncorrectConstruction("Help flag already initialized");