shell: suppress newlines on boot when promt is an empty string
If the user sets the default_prompt to an empty string no newlines will be printed during boot. Signed-off-by: Gerhard Jörges <joerges@metratec.com>
This commit is contained in:
parent
63a65bead0
commit
d99827f0a5
2 changed files with 11 additions and 5 deletions
|
@ -1413,7 +1413,9 @@ int shell_start(const struct shell *shell)
|
|||
z_shell_vt100_color_set(shell, SHELL_NORMAL);
|
||||
}
|
||||
|
||||
z_shell_raw_fprintf(shell->fprintf_ctx, "\n\n");
|
||||
if (z_shell_strlen(shell->default_prompt) > 0) {
|
||||
z_shell_raw_fprintf(shell->fprintf_ctx, "\n\n");
|
||||
}
|
||||
state_set(shell, SHELL_STATE_ACTIVE);
|
||||
|
||||
k_mutex_unlock(&shell->ctx->wr_mtx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue