POSIX: added separators between commands run from shell

Output a separator and the command called to make the ouput easier
to read.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois 2015-04-27 14:03:23 -07:00
parent 58a33dd26a
commit a284a7b6d9
1 changed files with 3 additions and 1 deletions

View File

@ -53,6 +53,7 @@ typedef int (*px4_main_t)(int argc, char *argv[]);
static void run_cmd(const vector<string> &appargs) {
// command is appargs[0]
string command = appargs[0];
cout << "----------------------------------\n";
if (apps.find(command) != apps.end()) {
const char *arg[appargs.size()+2];
@ -62,11 +63,12 @@ static void run_cmd(const vector<string> &appargs) {
++i;
}
arg[i] = (char *)0;
cout << "Running: " << command << "\n";
apps[command](i,(char **)arg);
}
else
{
cout << "Invalid command" << endl;
cout << "Invalid command: " << command << endl;
list_builtins();
}
}