diff fish/config.fish @ 241:e869b2f99c75

Start using `hg-prompt`.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 24 Dec 2014 15:30:57 -0800
parents 210c011ffd52
children 9ea1d601383e
line wrap: on
line diff
--- a/fish/config.fish	Fri Dec 12 16:53:19 2014 -0800
+++ b/fish/config.fish	Wed Dec 24 15:30:57 2014 -0800
@@ -49,7 +49,7 @@
 set green (set_color green)
 set gray (set_color -o black)
 set hg_promptstring "< on $magenta<branch>$normal>< at $yellow<tags|$normal, $yellow>$normal>$green<status|modified|unknown><update>$normal<
-patches: <patches|join( → )|pre_applied($yellow)|post_applied($normal)|pre_unapplied($gray)|post_unapplied($normal)>>" 2>/dev/null
+patches: <patches|join( → )|pre_applied($yellow)|post_applied($normal)|pre_unapplied($gray)|post_unapplied($normal)>>" 2>/dev/null
 
 function virtualenv_prompt
     if [ -n "$VIRTUAL_ENV" ]
@@ -58,13 +58,7 @@
 end
 
 function hg_prompt
-    if hg root >/dev/null 2>&1
-        set_color normal
-        printf ' on '
-        set_color magenta
-        printf '%s' (hg branch)
-        set_color normal
-    end
+    hg prompt --angle-brackets $hg_promptstring 2>/dev/null
 end
 
 function git_prompt