diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -63,6 +63,7 @@ It: * Allows one value flag to take a specific number of values (like `--foo first second`, where --foo slurps both arguments). * Allows you to have value flags only optionally accept values +* Provides autocompletion for bash # What does it not do? @@ -179,10 +180,16 @@ int main(int argc, char **argv) { args::ArgumentParser parser("This is a test program.", "This goes after the options."); args::HelpFlag help(parser, "help", "Display this help menu", {'h', "help"}); + args::CompletionFlag completion(parser, {"complete"}); try { parser.ParseCLI(argc, argv); } + catch (args::Completion e) + { + std::cout << e.what(); + return 0; + } catch (args::Help) { std::cout << parser; |