Selaa lähdekoodia

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

No need to fork every time.
pull/301/head
m0viefreak 8 vuotta sitten
committed by Daniel Shahaf
vanhempi
commit
38c8fbea2d
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. +1
    -1
      highlighters/root/root-highlighter.zsh

+ 1
- 1
highlighters/root/root-highlighter.zsh Näytä tiedosto

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

Ladataan…
Peruuta
Tallenna