Fix incorrect auto-completion suggestions

fixes #7378
This commit is contained in:
Gunnar Beutner 2014-10-15 08:32:46 +02:00
parent 445376833c
commit 14d8366d05
1 changed files with 3 additions and 0 deletions

View File

@ -207,6 +207,9 @@ void CLICommand::ShowCommands(int argc, char **argv, po::options_description *vi
if (autocomplete) {
if (autoindex < argc)
aword = argv[autoindex];
if (autoindex - 1 > best_match.size())
return;
} else
std::cout << "Supported commands: " << std::endl;