fix color printing bug

This commit is contained in:
Ilan Cosman 2021-04-26 11:56:12 -07:00
parent b8401770dc
commit 4fd53f8a73
2 changed files with 4 additions and 5 deletions

View File

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

View File

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