summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-05-01 22:23:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-01 22:23:57 (GMT)
commitb9347eb224d7b38f29893e75b6ca16a61647a4f2 (patch)
tree049d66f4142adde81d99671df8bf0426d369132b /contrib/completion
parent7e6a0cc47da79dd22c0338aee8750fda92ced5d9 (diff)
parentb71dc3e1a04666fae4a4e282973d9b5a122a997c (diff)
downloadgit-b9347eb224d7b38f29893e75b6ca16a61647a4f2.zip
git-b9347eb224d7b38f29893e75b6ca16a61647a4f2.tar.gz
git-b9347eb224d7b38f29893e75b6ca16a61647a4f2.tar.bz2
Merge branch 'zk/prompt-rebase-step'
* zk/prompt-rebase-step: bash-prompt.sh: show where rebase is at when stopped
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-prompt.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 054c52e..eaf5c36 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -263,14 +263,21 @@ __git_ps1 ()
else
local r=""
local b=""
- if [ -f "$g/rebase-merge/interactive" ]; then
- r="|REBASE-i"
- b="$(cat "$g/rebase-merge/head-name")"
- elif [ -d "$g/rebase-merge" ]; then
- r="|REBASE-m"
+ local step=""
+ local total=""
+ if [ -d "$g/rebase-merge" ]; then
b="$(cat "$g/rebase-merge/head-name")"
+ step=$(cat "$g/rebase-merge/msgnum")
+ total=$(cat "$g/rebase-merge/end")
+ if [ -f "$g/rebase-merge/interactive" ]; then
+ r="|REBASE-i"
+ else
+ r="|REBASE-m"
+ fi
else
if [ -d "$g/rebase-apply" ]; then
+ step=$(cat "$g/rebase-apply/next")
+ total=$(cat "$g/rebase-apply/last")
if [ -f "$g/rebase-apply/rebasing" ]; then
r="|REBASE"
elif [ -f "$g/rebase-apply/applying" ]; then
@@ -308,6 +315,10 @@ __git_ps1 ()
}
fi
+ if [ -n "$step" ] && [ -n "$total" ]; then
+ r="$r $step/$total"
+ fi
+
local w=""
local i=""
local s=""