zshrc.d/20-prompt.zrc
changeset 11 ee97df34536f
parent 7 c032d39eafcf
child 13 e1da4a7a9e92
--- a/zshrc.d/20-prompt.zrc	Sun Jul 15 01:58:11 2012 +0200
+++ b/zshrc.d/20-prompt.zrc	Sun Jul 15 10:40:16 2012 +0200
@@ -39,6 +39,8 @@
 source $ZDOTDIR/tools/git-prompt.sh > /dev/null 2>&1
 function __git_prompt_info {
   r=$(__git_ps1)
+  # If GIT_PS1_SHOWUNTRACKEDFILES is used, we need to escape the %
+  r=${r//\%/%%}
   if [ ! -z $r ]; then echo -e "\n%Bgit%b$r"; fi
 }