use of jline.console.completer.NullCompleter in project hive by apache.
the class BeeLineCommandCompleter method getCompleters.
public static List<Completer> getCompleters(Iterable<CommandHandler> handlers) {
List<Completer> completers = new LinkedList<Completer>();
for (CommandHandler handler : handlers) {
String[] commandNames = handler.getNames();
if (commandNames != null) {
for (String commandName : commandNames) {
List<Completer> compl = new LinkedList<Completer>();
compl.add(new StringsCompleter(BeeLine.COMMAND_PREFIX + commandName));
compl.addAll(Arrays.asList(handler.getParameterCompleters()));
// last param no complete
compl.add(new NullCompleter());
completers.add(new AggregateCompleter(compl.toArray(new Completer[compl.size()])));
}
}
}
return completers;
}
Aggregations