diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2008-10-30 17:33:21 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-10-30 17:33:21 +0100 |
commit | db01d97db5efcb06e3999cb60afd98fcb552a6b1 (patch) | |
tree | a7421a83501c4308803420f3956d48aa353c4148 /zshrc | |
parent | ef2fd43bb34f6690a34237828b40eb3b5b1cce59 (diff) |
Best management of ~ folder for sudo logins
Diffstat (limited to 'zshrc')
-rw-r--r-- | zshrc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |