Bläddra i källkod

root-highlighter: use EUID instead of id -u command

No need to fork every time.
pull/301/head
m0viefreak 8 år sedan
committed by Daniel Shahaf
förälder
incheckning
38c8fbea2d
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. +1
    -1
      highlighters/root/root-highlighter.zsh

+ 1
- 1
highlighters/root/root-highlighter.zsh Visa fil

@ -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]") }
}

Laddar…
Avbryt
Spara