]> granicus.if.org Git - icinga2/commitdiff
Fix auto-completion for ambiguous commands
authorGunnar Beutner <gunnar@beutner.name>
Wed, 22 Oct 2014 06:16:56 +0000 (08:16 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Wed, 22 Oct 2014 06:16:56 +0000 (08:16 +0200)
fixes #7404

lib/cli/clicommand.cpp

index f35ddb77df80222c27b7a06d918a70b79f516097..fab8657cf57af1104c1b46795b616fd4ecbe477b 100644 (file)
@@ -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;