__fish_hg_prompt: Add bookmark support

This commit is contained in:
Fabian Homborg 2015-09-26 20:41:18 +02:00
parent eadd4d9b71
commit a19f4dd4c8

View file

@ -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)