From 9ff6e38871e2d4f48017e5017302ce4535d5742f Mon Sep 17 00:00:00 2001 From: Nelson Chen Date: Tue, 6 Jan 2015 01:23:42 -0800 Subject: [PATCH] Ported Caret color --- fish_prompt.fish | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index 1725c53..e222b85 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -1,10 +1,15 @@ -function __caret - +function __caret_color + if [ $USER = "root" ] + echo -n "red" + else + echo -n "magenta" + end end + function fish_prompt - echo -s (set_color -o cyan)(whoami)@(hostname) - echo '>' + echo -s (set_color -o cyan)(whoami)(set_color normal)@(hostname| cut -d . -f 1) + echo -s (set_color (__caret_color))'# '(set_color normal) end function fish_right_prompt -d "Write out the right prompt"