Skip suggestions for pre-defined values if none assigned

consistent_macro_prefix v4.14.1
Martchus 4 years ago
parent b69b841fa3
commit 89a4c2f33a
  1. 2
      CMakeLists.txt
  2. 3
      application/argumentparser.cpp

@ -136,7 +136,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
set(META_APP_DESCRIPTION "Useful C++ classes and routines such as argument parser, IO and conversion utilities")
set(META_VERSION_MAJOR 4)
set(META_VERSION_MINOR 14)
set(META_VERSION_PATCH 0)
set(META_VERSION_PATCH 1)
# find required 3rd party libraries
include(3rdParty)

@ -1227,6 +1227,9 @@ string ArgumentParser::findSuggestions(int argc, const char *const *argv, unsign
}
// -> consider relevant values
for (const Argument *const arg : completionInfo.relevantPreDefinedValues) {
if (!arg->preDefinedCompletionValues()) {
continue;
}
for (const char *i = arg->preDefinedCompletionValues(); *i; ++i) {
const char *const wordStart(i);
const char *wordEnd(wordStart + 1);

Loading…
Cancel
Save