diff options
author | Leonid Volnitsky <leonid@volnitsky.com> | 2012-07-06 09:46:35 -0700 |
---|---|---|
committer | Leonid Volnitsky <leonid@volnitsky.com> | 2012-07-06 09:46:35 -0700 |
commit | 3b1c0e21e7630c5575e2e1fc8939fc1db50f84c1 (patch) | |
tree | e302cf0b4d61091041fef0a9f6757a7be1d28265 /git-prompt.sh | |
parent | Merge pull request #26 from orefalo/master (diff) | |
parent | Show current bookmark in Mercurial (diff) | |
download | git-prompt-3b1c0e21e7630c5575e2e1fc8939fc1db50f84c1.tar.gz git-prompt-3b1c0e21e7630c5575e2e1fc8939fc1db50f84c1.tar.bz2 git-prompt-3b1c0e21e7630c5575e2e1fc8939fc1db50f84c1.zip |
Merge pull request #23 from ronnix/master
Show current bookmark in Mercurial
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-x | git-prompt.sh | 8 |
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 } |