if (( EUID == 0 )); then # If root, omit the username and print the hostname in red. PS1='%1v%B%F\h %(?..%? )%F{blue}%~ # %f%b' else # Otherwise, print the username and hostname in green. PS1='%1v%B%F{green}%n@%m%F{blue} %(?..%F{red}%? %F{blue})%~ $ %f%b' fi RPROMPT=$(date '+%H:%m:%S')