mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
avoid forking subshell to test if user is root
This commit is contained in:
parent
7a9cc19819
commit
8d2b9d10e5
7 changed files with 7 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
|
||||
if [ $UID -eq 0 ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
|
||||
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue