Shell: Remove unnecessary new lines at startup
When the shell start, it will print two lines. The reason for that behavior is not documented. Remove that to make the code simpler and shorter one line at a time. Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
This commit is contained in:
parent
e34542a3de
commit
9aba9ddd0c
1 changed files with 4 additions and 3 deletions
|
@ -1446,9 +1446,10 @@ int shell_start(const struct shell *sh)
|
|||
z_shell_vt100_color_set(sh, SHELL_NORMAL);
|
||||
}
|
||||
|
||||
if (z_shell_strlen(sh->default_prompt) > 0) {
|
||||
z_shell_raw_fprintf(sh->fprintf_ctx, "\n\n");
|
||||
}
|
||||
/* print new line before printing the prompt to clear the line
|
||||
* vt100 are not used here for compatibility reasons
|
||||
*/
|
||||
z_cursor_next_line_move(sh);
|
||||
state_set(sh, SHELL_STATE_ACTIVE);
|
||||
|
||||
k_mutex_unlock(&sh->ctx->wr_mtx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue