From e6546fc7509dff4e66e462826607229012e0f35c Mon Sep 17 00:00:00 2001 From: mlelansky Date: Sat, 2 Apr 2016 16:51:07 +0200 Subject: [PATCH] Add helper function to get the mercurial bookmark. Add a new function to get the current mercurial bookmark which can be used in the theme prompts for example. --- plugins/mercurial/mercurial.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh index 3ae59496..9cd32991 100644 --- a/plugins/mercurial/mercurial.plugin.zsh +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -63,3 +63,9 @@ function hgic() { function hgoc() { hg outgoing "$@" | grep "changeset" | wc -l } + +function hg_get_bookmark_name() { + if [ $(in_hg) ]; then + echo $(hg id -B) + fi +}