user colors
August 1, 2016 · View on GitHub
if [ $UID -eq 0 ]; then USERCOLOR="red"; else USERCOLOR="green"; fi
box name
function box_name { [ -f ~/.box-name ] && cat ~/.box-name || echo $HOST }
workdir
local current_dir='{PWD/#HOME/~}'
return status
local ret_status="%(?:%{fg_bold[red]%}➤ %s)"
prompt format: \n USER MACHINE DIRECTORY \n STATUS
PROMPT="%{USERCOLOR]%}%n
%{fg[255]%}
reset_color%}
%{{current_dir}
%{{ret_status}
%{$reset_color%}"