prompt: add return status indicator

master
an 2019-08-15 23:39:12 -04:00
parent 980b80fc9f
commit f86e7efebd
1 changed files with 7 additions and 1 deletions

View File

@ -1,8 +1,14 @@
# vim: syntax=fish:
function fish_prompt
set _stat $status
echo -n (set_color 70a9ff)(date +%H:%M:%S)
echo -n (set_color normal)@
echo -n (set_color normal)(
if test $_stat -eq 0
echo '@'
else
echo '!'
end)
echo -n (set_color c792ea)$hostname
echo (set_color normal)"% "
end