summaryrefslogtreecommitdiff
path: root/zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'zshrc')
-rw-r--r--zshrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/zshrc b/zshrc
index 69ad79d..5aa06b4 100644
--- a/zshrc
+++ b/zshrc
@@ -77,7 +77,7 @@ if [ -d $ZDOTDIR ]; then
fi
# For sudo shells
-if [ "$USER" = "root" -a "$SUDO_USER" != "$USER" ]
+if [ ! -z "$SUDO_USER" ]
then
export HOME=~$USER
[ "`pwd`" = ~$SUDO_USER ] && cd