Commit e762f8fb397240c24af43eef6f6aec5859d4f117

Authored by Henry Fredrick Schreiner
1 parent b2376bd3

Adding help shortcircut mention

Showing 1 changed file with 3 additions and 1 deletions
README.md
... ... @@ -110,11 +110,13 @@ try {
110 110 }
111 111 ```
112 112  
  113 +The try/catch block ensures that `-h,--help` or a parse error will exit with the correct return code (selected from `CLI::ExitCodes`). (The return here should be inside `main`). You should not assume that the option values have been set inside the catch block; for example, help flags intentionally short-circuit all other processing for speed and to ensure required options and the like do not interfere.
  114 +
113 115 </p></details>
114 116 </br>
115 117  
116 118  
117   -The initialization is just one line, adding options is just two each. The try/catch block ensures that `-h,--help` or a parse error will exit with the correct return code (selected from `CLI::ExitCodes`). (The return here should be inside `main`). After the app runs, the filename will be set to the correct value if it was passed, otherwise it will be set to the default. You can check to see if this was passed on the command line with `app.count("--file")`.
  119 +The initialization is just one line, adding options is just two each. The parse macro is just one line (or 5 for the contents of the macro). After the app runs, the filename will be set to the correct value if it was passed, otherwise it will be set to the default. You can check to see if this was passed on the command line with `app.count("--file")`.
118 120  
119 121 The supported values are:
120 122  
... ...