From 178e861a49c8e96e05ac0b5acc90330edfe894a3 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 5 Feb 2009 16:49:11 +0100 Subject: [SUDO] just test if we are sudo-ed, not only root --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zshrc') 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 -- cgit v1.2.3