shell: improve shell_execute_cmd function
The function to execute shell commands: shell_execute_cmd will now behave similarly to invoking command line commands. I.e. after the command is executed the command buffer is cleared, while the cursor is set to the initial position. Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
parent
361956b669
commit
1d00a75d21
1 changed files with 2 additions and 0 deletions
|
@ -1608,6 +1608,8 @@ int shell_execute_cmd(const struct shell *shell, const char *cmd)
|
|||
ret_val = execute(shell);
|
||||
k_mutex_unlock(&shell->ctx->wr_mtx);
|
||||
|
||||
cmd_buffer_clear(shell);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue