Browse Source

Fix suggestion if only one available

consistent_macro_prefix
Martchus 4 years ago
parent
commit
5eb3e2aa75
  1. 2
      application/argumentparser.cpp

2
application/argumentparser.cpp

@ -1231,7 +1231,7 @@ string ArgumentParser::findSuggestions(int argc, const char *const *argv, unsign
suggestionStr += "\nDid you mean ";
size_t i = 0;
for (const auto &suggestion : bestSuggestions) {
if (++i == suggestionCount) {
if (++i == suggestionCount && suggestionCount != 1) {
suggestionStr += " or ";
} else if (i > 1) {
suggestionStr += ", ";

Loading…
Cancel
Save