[zsh] fix and improve fallback prompt
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
if (( EUID == 0 )); then
|
if (( EUID == 0 )); then
|
||||||
# If root, omit the username and print the hostname in red.
|
# If root, omit the username and print the hostname in red.
|
||||||
PS1='%1v%B%F\h %(?..%? )%F{blue}%~ # %f%b'
|
PS1='%1v%B%F{red}%(?..%? )%m %F{blue}%~ # %f%b'
|
||||||
else
|
else
|
||||||
# Otherwise, print the username and hostname in green.
|
# Otherwise, print the username and hostname in green.
|
||||||
PS1='%1v%B%F{green}%n@%m%F{blue} %(?..%F{red}%? %F{blue})%~ $ %f%b'
|
PS1='%1v%B%(?..%F{red}%? )%F{green}%n@%m%F{blue} %~ $ %f%b'
|
||||||
fi
|
fi
|
||||||
RPROMPT=$(date '+%H:%m:%S')
|
RPROMPT=$(date '+%H:%m:%S')
|
||||||
|
|||||||
Reference in New Issue
Block a user