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 <yongcong.sin@gmail.com>
This commit is contained in:
Yong Cong Sin 2021-08-30 12:13:18 +08:00 committed by Carles Cufí
commit c1a45596c6

View file

@ -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,