diff --git a/include/blt/parse/argparse.h b/include/blt/parse/argparse.h index bf582f4..79a56db 100755 --- a/include/blt/parse/argparse.h +++ b/include/blt/parse/argparse.h @@ -420,7 +420,6 @@ namespace blt inline void setHelpExtras(std::string str) { - addArgument(blt::arg_builder(str).setAction(blt::arg_action_t::STORE_TRUE).build()); help_inclusion = std::move(str); } diff --git a/libraries/parallel-hashmap b/libraries/parallel-hashmap index 93201da..77cab81 160000 --- a/libraries/parallel-hashmap +++ b/libraries/parallel-hashmap @@ -1 +1 @@ -Subproject commit 93201da2ba5a6aba0a6e57ada64973555629b3e3 +Subproject commit 77cab8192a879e5d27188f97e8f2080dd7e36ca8 diff --git a/src/blt/parse/argparse.cpp b/src/blt/parse/argparse.cpp index 70dec5f..96db923 100755 --- a/src/blt/parse/argparse.cpp +++ b/src/blt/parse/argparse.cpp @@ -406,9 +406,22 @@ namespace blt loaded_args.program_name = tokenizer.get(); tokenizer.advance(); + if (!help_inclusion.empty()) + { + // advance the tokenizer to post grouped args allowing for flags + while (tokenizer.hasCurrent() && tokenizer.get() != help_inclusion) + tokenizer.advance(); + tokenizer.advance(); + } + size_t last_positional = 0; while (tokenizer.hasCurrent()) { + // if we find an arg which disables help (basically a grouping flag) then we should stop processing args + // TODO: rename this to be more descriptive + if (help_disabled) + break; + if (tokenizer.isFlag()) handleFlagArgument(tokenizer); else