Close #94 PR: Show when root.
This commit is contained in:
committed by
Sindre Sorhus
parent
2577a4cc07
commit
09740f68ea
3
pure.zsh
3
pure.zsh
@@ -117,6 +117,9 @@ prompt_pure_setup() {
|
|||||||
# show username@host if logged in through SSH
|
# show username@host if logged in through SSH
|
||||||
[[ "$SSH_CONNECTION" != '' ]] && prompt_pure_username='%n@%m '
|
[[ "$SSH_CONNECTION" != '' ]] && prompt_pure_username='%n@%m '
|
||||||
|
|
||||||
|
# show username@host if root, with username in white
|
||||||
|
[[ $UID -eq 0 ]] && prompt_pure_username='%F{white}%n%F{242}@%m '
|
||||||
|
|
||||||
# prompt turns red if the previous command didn't exit with 0
|
# prompt turns red if the previous command didn't exit with 0
|
||||||
PROMPT='%(?.%F{magenta}.%F{red})❯%f '
|
PROMPT='%(?.%F{magenta}.%F{red})❯%f '
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user