瀏覽代碼

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

Loading…
取消
儲存