}
public Set<String> complete(String part) {
TreeSet<String> result = new TreeSet<String>();
CommandsTemplate commandsTemplate = this.interperter.getCommandsTemplate();
IndexedMap<String, Command> builtinCommands = this.interperter.getBuiltinCommands();
for (int i = 0; i < builtinCommands.size(); i++) {
String command = builtinCommands.getKey(i);
if (command.startsWith(part)) result.add(command);
}
IndexedMap<String, Command> commands = commandsTemplate.getDefaultGroup().getCommands();
for (int i = 0; i < commands.size(); i++) {
String command = commands.getKey(i);
if (command.startsWith(part)) result.add(command);
}