The use of colors in a prompt is only possible in pcmode (using the variable PROMPT_COMMAND). Make color prompt work in non-pcmode (using the variable PS1) for both Bash and ZSH. This requires editing __git_ps1() and __git_ps1_colorize_gitstring(), which have duplicate code to handle the prompt gitstring and color codes. Prior to enable colors in non-pcmode, refactor __git_ps1() and __git_ps1_colorize_gitstring(). Eduardo R. D'Avila (3): t9903: add tests for git-prompt pcmode git-prompt.sh: refactor colored prompt code git-prompt.sh: enable color prompt in non-pcmode contrib/completion/git-prompt.sh | 91 +++++-------- t/t9903-bash-prompt.sh | 269 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 301 insertions(+), 59 deletions(-) -- 1.8.3.1.440.g82707f8 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html