2015-01-06 10:23:42 +01:00
|
|
|
function __caret_color
|
|
|
|
if [ $USER = "root" ]
|
|
|
|
echo -n "red"
|
|
|
|
else
|
|
|
|
echo -n "magenta"
|
|
|
|
end
|
2015-01-06 09:25:13 +01:00
|
|
|
end
|
|
|
|
|
2015-01-06 10:23:42 +01:00
|
|
|
|
2015-01-06 09:25:13 +01:00
|
|
|
function fish_prompt
|
2015-01-06 10:48:05 +01:00
|
|
|
echo (set_color -o cyan)(whoami)(set_color normal)(set_color yellow)@(set_color -o blue)(hostname| cut -d . -f 1)(set_color normal):
|
|
|
|
echo -n (set_color (__caret_color))'# '(set_color normal)
|
2015-01-06 09:25:13 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
function fish_right_prompt -d "Write out the right prompt"
|
|
|
|
date "+%m/%d/%y"
|
|
|
|
end
|