From d25d03ab4a37fa4be54a272b4443956620b15330 Mon Sep 17 00:00:00 2001 From: Sean Patrick Hagen Date: Fri, 17 Jun 2022 13:01:51 -0700 Subject: [PATCH] Better color setting for prompt --- functions/fish_prompt.fish | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 4b5eb9f..04f2a07 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -887,19 +887,21 @@ function __bobthefish_prompt_golang -S -d 'Display current Go information' if printf "%s\n%s" "$gomod_version" "$actual_go_version" | sort --check=silent --version-sort set high_enough_version "1" end - end + end - __bobthefish_start_segment $color_virtualgo - echo -ns $go_glyph - # do we show the version in red if it's not the right version? if [ "$theme_display_go_show_wrong_version" = "yes" ] # yes we do, so check if the version is high enough if [ "$high_enough_version" = "0" ] # the version of go isn't high enough __bobthefish_start_segment $color_rvm + else + __bobthefish_start_segment $color_virtualgo end + else + __bobthefish_start_segment $color_virtualgo end + echo -ns $go_glyph if [ "$theme_display_go_actual" = "yes" ] if [ "$actual_go_version" = "0" ]