浏览代码

Fix syntax error in zsh config

Emmanuel Bouthenot 9 年之前
父节点
当前提交
4e57fbda3d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      .zsh/config/02_runasroot.zsh

+ 1 - 1
.zsh/config/02_runasroot.zsh

@@ -2,7 +2,7 @@
 # Use the user zsh configuration as root
 #
 
-if [[ "$SUDO_USER" ]] && [[ "$UID" = 0 ]]; then
+if [[ -n "$SUDO_USER" ]] && [[ "$UID" = 0 ]]; then
     # define root history path
     export HISTFILE="$ZSHDOTDIR/history/history_root"
     if [[ -f ~/.zcompdump ]]; then