From a19f4dd4c8f8240a0a1380fbb1e9c33d4095e519 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 26 Sep 2015 20:41:18 +0200 Subject: [PATCH] __fish_hg_prompt: Add bookmark support --- share/functions/__fish_hg_prompt.fish | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/functions/__fish_hg_prompt.fish b/share/functions/__fish_hg_prompt.fish index 2ec2591d5..3d48bb7fa 100644 --- a/share/functions/__fish_hg_prompt.fish +++ b/share/functions/__fish_hg_prompt.fish @@ -37,6 +37,12 @@ function __fish_hg_prompt --description 'Write out the hg prompt' return end + set -l bookmark (hg bookmark -q) + # Unfortunately, hg bookmark doesn't exit non-zero when there's no bookmark + if test -n "$bookmark" + set branch "$branch/$bookmark" + end + echo -n '|' set -l repo_status (hg status |cut -c 1-2|sort -u|uniq)