From adac636d47bbcad7fb4c032b06bb733de8abd93a Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.uk>
Date: Tue, 10 Nov 2020 15:25:23 +0000
Subject: [PATCH] git: Use __git_ps1 in Git prompt

Use the `__git_ps1` function within the Git prompt to give additional
information when operations like a rebase is happening.
---
 tag-zsh/zsh/configs/prompt.zsh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tag-zsh/zsh/configs/prompt.zsh b/tag-zsh/zsh/configs/prompt.zsh
index 2c343e01..c2273722 100644
--- a/tag-zsh/zsh/configs/prompt.zsh
+++ b/tag-zsh/zsh/configs/prompt.zsh
@@ -1,3 +1,5 @@
+source /usr/lib/git-core/git-sh-prompt
+
 git_is_repo() {
   if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == "true" ]]; then
     return 1
@@ -34,7 +36,7 @@ git_prompt_info() {
   fi
 
   if [[ -n git_current_branch ]]; then
-    echo " %{$fg_bold[green]%}${current_branch}%{$reset_color%}${suffix}"
+    echo " %{$fg_bold[green]%}$(__git_ps1 %s)%{$reset_color%}${suffix}"
   fi
 }