summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zshrc8
1 files changed, 4 insertions, 4 deletions
diff --git a/zshrc b/zshrc
index ec461f3..e39d09d 100644
--- a/zshrc
+++ b/zshrc
@@ -71,9 +71,9 @@ if [ -d $ZDOTDIR ]; then
fi
# For sudo shells
-#if [ "$USER" = "root" ]
-#then
- [ "`pwd`" = ~ ] && cd ~$USER
+if [ "$USER" = "root" -a "$SUDO_USER" != "$USER" ]
+then
export HOME=~$USER
-#fi
+ [ "`pwd`" = ~$SUDO_USER ] && cd
+fi