mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
root-highlighter: use EUID instead of id -u command
No need to fork every time.
This commit is contained in:
parent
b52a485c5c
commit
38c8fbea2d
1 changed files with 1 additions and 1 deletions
|
|
@ -40,5 +40,5 @@ _zsh_highlight_root_highlighter_predicate()
|
||||||
# root highlighting function.
|
# root highlighting function.
|
||||||
_zsh_highlight_root_highlighter()
|
_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]") }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue