Sfoglia il codice sorgente

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

No need to fork every time.
pull/301/head
m0viefreak 8 anni fa
committed by Daniel Shahaf
parent
commit
38c8fbea2d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      highlighters/root/root-highlighter.zsh

+ 1
- 1
highlighters/root/root-highlighter.zsh Vedi File

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

Caricamento…
Annulla
Salva