079fef48dfc06b415423abb0a1e467f85e03b2c4

Author
Felipe Contreras <felipe.contreras@gmail.com>
Committer
Felipe Contreras <felipe.contreras@gmail.com>
Date

Message

gitfast: fix the prompt colour

We can add colour in Zsh without the need of pcmode.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

Diff

 1diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh
 2index 64219e631ab9babdc9eb78137478bde2c2cabec8..0da14eee9ab4bc1865e80d58070240e4bc4bf45e 100644
 3--- a/plugins/gitfast/git-prompt.sh
 4+++ b/plugins/gitfast/git-prompt.sh
 5@@ -502,9 +502,11 @@ __git_ps1 ()
 6 
 7 	local z="${GIT_PS1_STATESEPARATOR-" "}"
 8 
 9-	# NO color option unless in PROMPT_COMMAND mode
10-	if [ $pcmode = yes ] && [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
11-		__git_ps1_colorize_gitstring
12+	# NO color option unless in PROMPT_COMMAND mode or it's Zsh
13+	if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
14+		if [ $pcmode = yes ] || [ -n "${ZSH_VERSION-}" ]; then
15+			__git_ps1_colorize_gitstring
16+		fi
17 	fi
18 
19 	b=${b##refs/heads/}