comparison 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
comparison
equal deleted inserted replaced
240:3a6b11d16a2a 241:e869b2f99c75
47 set magenta (set_color magenta) 47 set magenta (set_color magenta)
48 set yellow (set_color yellow) 48 set yellow (set_color yellow)
49 set green (set_color green) 49 set green (set_color green)
50 set gray (set_color -o black) 50 set gray (set_color -o black)
51 set hg_promptstring "< on $magenta<branch>$normal>< at $yellow<tags|$normal, $yellow>$normal>$green<status|modified|unknown><update>$normal< 51 set hg_promptstring "< on $magenta<branch>$normal>< at $yellow<tags|$normal, $yellow>$normal>$green<status|modified|unknown><update>$normal<
52 patches: <patches|join( → )|pre_applied($yellow)|post_applied($normal)|pre_unapplied($gray)|post_unapplied($normal)>>" 2>/dev/null 52 patches: <patches|join( → )|pre_applied($yellow)|post_applied($normal)|pre_unapplied($gray)|post_unapplied($normal)>>" 2>/dev/null
53 53
54 function virtualenv_prompt 54 function virtualenv_prompt
55 if [ -n "$VIRTUAL_ENV" ] 55 if [ -n "$VIRTUAL_ENV" ]
56 printf '(%s) ' (basename "$VIRTUAL_ENV") 56 printf '(%s) ' (basename "$VIRTUAL_ENV")
57 end 57 end
58 end 58 end
59 59
60 function hg_prompt 60 function hg_prompt
61 if hg root >/dev/null 2>&1 61 hg prompt --angle-brackets $hg_promptstring 2>/dev/null
62 set_color normal
63 printf ' on '
64 set_color magenta
65 printf '%s' (hg branch)
66 set_color normal
67 end
68 end 62 end
69 63
70 function git_prompt 64 function git_prompt
71 if git root >/dev/null 2>&1 65 if git root >/dev/null 2>&1
72 set_color normal 66 set_color normal