@Override
public int readConsoleOutput(ConsoleOperation output) {
CommandResult result = CommandResult.SUCCESS;
if(output != null && output.getBuffer().trim().length() > 0) {
try {
CommandContainer commandContainer =
getCommand( Parser.findFirstWord(output.getBuffer()), output.getBuffer());
commandContainer.getParser().getCommandPopulator().populateObject(commandContainer.getCommand(),
commandContainer.getParser().parse(output.getBuffer()));
//validate the command before execute
if(commandContainer.getParser().getCommand().getValidator() != null)
commandContainer.getParser().getCommand().getValidator().validate(commandContainer.getCommand());
result = commandContainer.getCommand().execute(
commandInvocationServices.getCommandInvocationProvider(commandInvocationProvider)
.enhanceCommandInvocation(new AeshCommandInvocation(console, output.getControlOperator())));
}
catch (CommandLineParserException e) {
getShell().out().println(e.getMessage());