Commit 9aba9ddd authored by Théo Battrel's avatar Théo Battrel Committed by Anas Nashif
Browse files

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: default avatarThéo Battrel <theo.battrel@nordicsemi.no>
parent e34542a3
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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);