mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 09:51:41 +00:00
avoid forking subshell to test if user is root
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||
|
||||
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
|
||||
RPROMPT='[%*]'
|
||||
|
Reference in New Issue
Block a user