From 21e7426594d74a11d06eb0f280ab359defd7e5e9 Mon Sep 17 00:00:00 2001 From: Gary Bartlett Date: Wed, 11 May 2016 20:51:01 -0700 Subject: [PATCH 1/2] Made 'x' a local variable so the 'git_prompt_color_samples' command can be repeated. --- git-prompt-help.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-prompt-help.sh b/git-prompt-help.sh index 0ae3e60..5bb8255 100755 --- a/git-prompt-help.sh +++ b/git-prompt-help.sh @@ -65,6 +65,7 @@ git_prompt_color_samples() { echo -e "${color}$1${ResetColor}" | sed 's/\\\]//g' | sed 's/\\\[//g' } + local x while (( x < 8 )) ; do showColor ${ColorNames[x]} showColor "Dim${ColorNames[x]}" From 1b59e1e07539cea03020e3ac1a991c11e21178b1 Mon Sep 17 00:00:00 2001 From: Gary Bartlett Date: Wed, 11 May 2016 21:19:49 -0700 Subject: [PATCH 2/2] Update git-prompt-help.sh Initialized local x to 0 (in case it is already set). --- git-prompt-help.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-prompt-help.sh b/git-prompt-help.sh index 5bb8255..849753a 100755 --- a/git-prompt-help.sh +++ b/git-prompt-help.sh @@ -65,7 +65,7 @@ git_prompt_color_samples() { echo -e "${color}$1${ResetColor}" | sed 's/\\\]//g' | sed 's/\\\[//g' } - local x + local x=0 while (( x < 8 )) ; do showColor ${ColorNames[x]} showColor "Dim${ColorNames[x]}"