From c1a45596c645a57eacf92e2e7d6803ed887a2712 Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Mon, 30 Aug 2021 12:13:18 +0800 Subject: [PATCH] subsys/shell: Use use_colors flag for shell instance Patches the instance_init to use the use_colors flag Signed-off-by: Yong Cong Sin --- subsys/shell/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/shell/shell.c b/subsys/shell/shell.c index 3c43adb5041..7feb6fc2714 100644 --- a/subsys/shell/shell.c +++ b/subsys/shell/shell.c @@ -1214,7 +1214,7 @@ static int instance_init(const struct shell *shell, const void *p_config, shell->ctx->vt100_ctx.cons.terminal_hei = CONFIG_SHELL_DEFAULT_TERMINAL_HEIGHT; shell->ctx->vt100_ctx.cons.name_len = z_shell_strlen(shell->ctx->prompt); - z_flag_use_colors_set(shell, IS_ENABLED(CONFIG_SHELL_VT100_COLORS)); + z_flag_use_colors_set(shell, IS_ENABLED(CONFIG_SHELL_VT100_COLORS) && use_colors); int ret = shell->iface->api->init(shell->iface, p_config, transport_evt_handler,