Merge pull request #745 from simonduq/contrib/shell-empty-cmd
Shell: skip empty lines
This commit is contained in:
commit
f42618ce94
@ -98,6 +98,8 @@ PT_THREAD(shell_input(struct pt *pt, shell_output_func output, const char *cmd))
|
||||
cmd++;
|
||||
}
|
||||
|
||||
/* Skip empty lines */
|
||||
if(*cmd != '\0') {
|
||||
/* Look for arguments */
|
||||
args = strchr(cmd, ' ');
|
||||
if(args != NULL) {
|
||||
@ -112,6 +114,7 @@ PT_THREAD(shell_input(struct pt *pt, shell_output_func output, const char *cmd))
|
||||
} else {
|
||||
SHELL_OUTPUT(output, "Command not found. Type 'help' for a list of commands\n");
|
||||
}
|
||||
}
|
||||
|
||||
output_prompt(output);
|
||||
PT_END(pt);
|
||||
|
Loading…
Reference in New Issue
Block a user