Skip to content

Commit 38c8fbe

Browse files
m0viedanielshahaf
authored andcommitted
root-highlighter: use EUID instead of id -u command
No need to fork every time.
1 parent b52a485 commit 38c8fbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

highlighters/root/root-highlighter.zsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ _zsh_highlight_root_highlighter_predicate()
4040
# root highlighting function.
4141
_zsh_highlight_root_highlighter()
4242
{
43-
if [[ $(command id -u) -eq 0 ]] { region_highlight+=("0 $#BUFFER $ZSH_HIGHLIGHT_STYLES[root]") }
43+
if (( EUID == 0 )) { region_highlight+=("0 $#BUFFER $ZSH_HIGHLIGHT_STYLES[root]") }
4444
}

0 commit comments

Comments
 (0)