From 4fd53f8a73b8159fab1e954a0428c1b8d1322f2e Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Mon, 26 Apr 2021 11:56:12 -0700 Subject: [PATCH] fix color printing bug --- functions/_tide_item_virtual_env.fish | 5 ++--- functions/_tide_print_item.fish | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/functions/_tide_item_virtual_env.fish b/functions/_tide_item_virtual_env.fish index db813a7..e8adf1a 100644 --- a/functions/_tide_item_virtual_env.fish +++ b/functions/_tide_item_virtual_env.fish @@ -1,11 +1,10 @@ function _tide_item_virtual_env if set -l splitVirtualEnv (string split '/' "$VIRTUAL_ENV") - set_color $tide_virtual_env_color # Avoid printing a generic name if contains -- $splitVirtualEnv[-1] virtualenv venv .venv env - printf '%s' $tide_virtual_env_icon' ' $splitVirtualEnv[-2] + _tide_print_item virtual_env $splitVirtualEnv[-2] else - printf '%s' $tide_virtual_env_icon' ' $splitVirtualEnv[-1] + _tide_print_item virtual_env $splitVirtualEnv[-1] end end end diff --git a/functions/_tide_print_item.fish b/functions/_tide_print_item.fish index 7793872..376357e 100644 --- a/functions/_tide_print_item.fish +++ b/functions/_tide_print_item.fish @@ -1,8 +1,8 @@ set -g tide_last_item newline function _tide_print_item -a item - itemColorName=tide_"$item"_color set itemColor $$colorName - itemBgColorName=tide_"$item"_bg_color set itemBgColor $$itemBgColor + itemColorName=tide_"$item"_color set itemColor $$itemColorName + itemBgColorName=tide_"$item"_bg_color set itemBgColor $$itemBgColorName if test "$_tide_which_side_working_on" = left if test "$tide_last_item" = newline