ソースを参照

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

No need to fork every time.
pull/301/head
m0viefreak 8年前
committed by Daniel Shahaf
コミット
38c8fbea2d
1個のファイルの変更1行の追加1行の削除
  1. +1
    -1
      highlighters/root/root-highlighter.zsh

+ 1
- 1
highlighters/root/root-highlighter.zsh ファイルの表示

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

読み込み中…
キャンセル
保存