Ejemplo n.º 1
0
void Shell::executeCommand(const LineBuffer& line){
  _out << '\n';
  _modules.commandExecute(line.line(), *this);
  const auto executionResult = handleExecuteCommand(line);
  _modules.commandExecuted(executionResult, line.line(), *this);
  switch (executionResult.status()) {
    case Status::NoMatch:
      _out << "Command not found [" << line.firstWord() << "]\n";
    case Status::Ok:
      prompt();
      break;
    case Status::Incomplete:
      _function.parse(":prompt_feed", _out, true);
      _column = _cursor.position().x;
      break;
  }
}