summaryrefslogtreecommitdiff
path: root/git-prompt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-xgit-prompt.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index 954a059..306d96b 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -374,8 +374,7 @@ parse_svn_status() {
parse_hg_status() {
# ☿
-
- [[ -d ./.hg/ ]] || return 1
+ hg_root=`hg root 2>/dev/null` || return 1
vcs=hg
@@ -393,8 +392,13 @@ parse_hg_status() {
branch=`hg branch 2> /dev/null`
+ [[ -f $hg_root/.hg/bookmarks.current ]] && bookmark=`cat "$hg_root/.hg/bookmarks.current"`
+
[[ -z $modified ]] && [[ -z $untracked ]] && [[ -z $added ]] && clean=clean
vcs_info=${branch/default/D}
+ if [[ "$bookmark" ]] ; then
+ vcs_info+=/$bookmark
+ fi
}