From 38c8fbea2dd22b32a5fa3793f7fa34133c5b2e07 Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Mon, 28 Mar 2016 14:55:56 +0200 Subject: [PATCH] root-highlighter: use EUID instead of id -u command No need to fork every time. --- highlighters/root/root-highlighter.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highlighters/root/root-highlighter.zsh b/highlighters/root/root-highlighter.zsh index 4362379..a9039d6 100644 --- a/highlighters/root/root-highlighter.zsh +++ b/highlighters/root/root-highlighter.zsh @@ -40,5 +40,5 @@ _zsh_highlight_root_highlighter_predicate() # root highlighting function. _zsh_highlight_root_highlighter() { - if [[ $(command id -u) -eq 0 ]] { region_highlight+=("0 $#BUFFER $ZSH_HIGHLIGHT_STYLES[root]") } + if (( EUID == 0 )) { region_highlight+=("0 $#BUFFER $ZSH_HIGHLIGHT_STYLES[root]") } }