From 079fef48dfc06b415423abb0a1e467f85e03b2c4 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Thu, 19 May 2016 23:32:44 -0500 Subject: [PATCH] gitfast: fix the prompt colour We can add colour in Zsh without the need of pcmode. Signed-off-by: Felipe Contreras --- plugins/gitfast/git-prompt.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh index 64219e63..0da14eee 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/}