String commandName = termPrefix.substring(0, pos);
termPrefix = termPrefix.substring(pos);
try {
Command<?> command = session.getCommand(commandName);
if (command != null) {
completion = command.complete(new RuntimeContextImpl(session, session.getContext().getAttributes()), termPrefix);
} else {
completion = new CompletionMatch(Delimiter.EMPTY, Completion.create());
}
}
catch (CommandException e) {