From 726a970299a9586ded627145d71cd7ff2a361498 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 7 Sep 2017 09:25:23 -0400 Subject: [PATCH] Cleanup macro mention --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index ef841ba..c1a4155 100644 --- a/README.md +++ b/README.md @@ -101,11 +101,7 @@ try { } ``` -> Note: The final five lines are so common, they have a dedicated macro: -> -> ```cpp -CLI11_PARSE(app, argc, argv) -``` +> Note: The final five lines are so common, they have a dedicated macro: `CLI11_PARSE(app, argc, argv)`. You can use that as long as you don't need the return value of `.parse`. 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")`. -- libgit2 0.21.4