summaryrefslogtreecommitdiff
path: root/zshrc
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-02-05 16:49:11 +0100
committerHugues Hiegel <hugues@hiegel.fr>2009-02-05 16:49:11 +0100
commit178e861a49c8e96e05ac0b5acc90330edfe894a3 (patch)
tree2b9fd1fc148b123bf61430d5a2b140933514a1e2 /zshrc
parent9868b8f17cc516f85fe3ad6c3189097066972f8f (diff)
[SUDO] just test if we are sudo-ed, not only root
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