diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-04-21 15:00:16 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-21 18:01:37 -0700 |
commit | 24b6132e571bf2e27536d42022f8c0733034d880 (patch) | |
tree | 624de107a9c943a9cc58f8ee68bcdff6d2cd6e4c | |
parent | remote-hg: fix commit messages (diff) | |
download | tgif-24b6132e571bf2e27536d42022f8c0733034d880.tar.xz |
prompt: fix untracked files for zsh
We signal presense of untracked files by adding a per-cent sign '%'
to the prompt. But because '%' is used as an escape character to
introduce prompt customization in zsh (just like bash prompt uses
'\' to escape '\u', '\h', etc.), we need to say '%%' to get a
literal per-cent.
Helped-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | contrib/completion/git-prompt.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 341422a766..d2af85403d 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -338,7 +338,7 @@ __git_ps1 () [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] && [ -n "$(git ls-files --others --exclude-standard)" ] then - u="%" + u="%${ZSH_VERSION+%}" fi if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then |