summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2016-05-19 23:32:44 -0500
committerFelipe Contreras <felipe.contreras@gmail.com>2016-05-19 23:53:40 -0500
commit079fef48dfc06b415423abb0a1e467f85e03b2c4 (patch)
treed1403eacbe172e20ae35b19a5145c4555453f901
parenteec3dc607c40b33a828938e396a459e70d8b01ed (diff)
downloadzsh-079fef48dfc06b415423abb0a1e467f85e03b2c4.tar.gz
zsh-079fef48dfc06b415423abb0a1e467f85e03b2c4.tar.bz2
zsh-079fef48dfc06b415423abb0a1e467f85e03b2c4.zip
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>
-rw-r--r--plugins/gitfast/git-prompt.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh
index 64219e631..0da14eee9 100644
--- a/plugins/gitfast/git-prompt.sh
+++ b/plugins/gitfast/git-prompt.sh
@@ -502,9 +502,11 @@ __git_ps1 ()
local z="${GIT_PS1_STATESEPARATOR-" "}"
- # NO color option unless in PROMPT_COMMAND mode
- if [ $pcmode = yes ] && [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
- __git_ps1_colorize_gitstring
+ # NO color option unless in PROMPT_COMMAND mode or it's Zsh
+ if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
+ if [ $pcmode = yes ] || [ -n "${ZSH_VERSION-}" ]; then
+ __git_ps1_colorize_gitstring
+ fi
fi
b=${b##refs/heads/}