Fix suggestion if only one available

This commit is contained in:
Martchus 2018-05-11 15:29:10 +02:00
parent 1aa8b387e1
commit 5eb3e2aa75
1 changed files with 1 additions and 1 deletions

View File

@ -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 += ", ";