From 7bf6b96b7136fe5f439a6a543b0a9a62d1d27d5e Mon Sep 17 00:00:00 2001 From: Alan Stebbens Date: Thu, 28 Aug 2014 11:39:42 -0700 Subject: [PATCH] aks: only define the colors once --- prompt-colors.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prompt-colors.sh b/prompt-colors.sh index 9249a7e..cacf7bb 100644 --- a/prompt-colors.sh +++ b/prompt-colors.sh @@ -76,7 +76,11 @@ define_color_names() { _def_color ResetColor 0 0 } -define_color_names + +# do the color definitions only once +if [[ ${#ColorNames[*]} = 0 || -z "$IntenseBlack" || -z "$ResetColor" ]]; then + define_color_names +fi # end of prompt-colors.sh # vim: set ai sw=2