mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
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:
committed by
Christopher Friedt
parent
361956b669
commit
1d00a75d21
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user