From 74830dd8ddd63e95c847918d6f474e6f9c37e242 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 22 Oct 2014 08:16:56 +0200 Subject: [PATCH] Fix auto-completion for ambiguous commands fixes #7404 --- lib/cli/clicommand.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cli/clicommand.cpp b/lib/cli/clicommand.cpp index f35ddb77d..fab8657cf 100644 --- a/lib/cli/clicommand.cpp +++ b/lib/cli/clicommand.cpp @@ -233,6 +233,9 @@ void CLICommand::ShowCommands(int argc, char **argv, po::options_description *vi continue; } + if (autocomplete && i >= autoindex - 1) + break; + if (vname[i] != argv[k]) break; -- 2.40.0