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