}
private CompleteOperation findAliases(String buffer, int cursor) {
if(settings.isAliasEnabled()) {
String command = Parser.findFirstWord(buffer);
Alias alias = aliasManager.getAlias(command);
if(alias != null) {
return new CompleteOperation( alias.getValue()+buffer.substring(command.length()),
cursor+(alias.getValue().length()-command.length()));
}
}
return new CompleteOperation(buffer, cursor);
}