mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-10-02 16:03:47 +02:00
avoid forking subshell to test if user is root
This commit is contained in:
1 parent
7a9cc19819
commit
8d2b9d10e5
7 files changed
+7
-7
No files matched your search
@@ -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@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%}
|
||||
|
||||
Reference in new issue
Block a user