public static void completeCommand(String commandPrefix, List<Candidate> candidates) {
        String command = Commands.TYPES.ceilingKey(commandPrefix);
        while (command != null && command.startsWith(commandPrefix)) {
            candidates.add(new Candidate(command));
            command = Commands.TYPES.higherKey(command);
        }
    }
Generate a list of potential completions for a prefix of a command name.

@param commandPrefix     The command prefix.  Non-null.
@param candidates        The list to add the output completions to.
shell/src/main/java/org/apache/kafka/shell/command/CommandUtils.java