{"thread":{"id":"51247","subject":"[PATCHt2] completion: prompt: fix for Zsh","startedAt":"2019-06-06T02:28:07Z","lastAt":"2019-06-06T02:28:07Z","messageCount":1,"participants":["Felipe Contreras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"376741","messageId":"20190606022803.3222-1-felipe.contreras@gmail.com","threadId":"51247","inReplyTo":null,"subject":"[PATCHt2] completion: prompt: fix for Zsh","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2019-06-06T02:28:03Z","receivedAt":"2019-06-06T02:28:07Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"We can add colour in Zsh without the need of pcmode.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n contrib/completion/git-prompt.sh | 8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh\nindex 983e419d2b..fd2b049dbd 100644\n--- a/contrib/completion/git-prompt.sh\n+++ b/contrib/completion/git-prompt.sh\n@@ -506,9 +506,11 @@ __git_ps1 ()\n \n \tlocal z=\"${GIT_PS1_STATESEPARATOR-\" \"}\"\n \n-\t# NO color option unless in PROMPT_COMMAND mode\n-\tif [ $pcmode = yes ] && [ -n \"${GIT_PS1_SHOWCOLORHINTS-}\" ]; then\n-\t\t__git_ps1_colorize_gitstring\n+\t# NO color option unless in PROMPT_COMMAND mode or it's Zsh\n+\tif [ -n \"${GIT_PS1_SHOWCOLORHINTS-}\" ]; then\n+\t\tif [ $pcmode = yes ] || [ -n \"${ZSH_VERSION-}\" ]; then\n+\t\t\t__git_ps1_colorize_gitstring\n+\t\tfi\n \tfi\n \n \tb=${b##refs/heads/}\n-- \n2.21.0\n\n"}]}