summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorhugues <hugues@a0e5b806-a6f9-0310-978d-cbce73f8a913>2007-05-16 11:30:16 +0000
committerHugues Hiegel <hugues@hiegel.fr>2008-03-07 14:15:12 +0100
commit04344bec779acce2b69487d63386191f54a9814f (patch)
treeb349355e2e23b5166236585d0598ee92fe678f1f /.zshrc
parent72896f1d1d0ae633d360aede3956d42036fd600d (diff)
Petits correctifs
git-svn-id: svn+ssh://hugues@maison/opt/svn/private/hugues@383 a0e5b806-a6f9-0310-978d-cbce73f8a913
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc7
1 files changed, 5 insertions, 2 deletions
diff --git a/.zshrc b/.zshrc
index 5ff5d81..7455049 100644
--- a/.zshrc
+++ b/.zshrc
@@ -31,13 +31,15 @@ UID=${UID:-`id -u`}
HOST=${HOST:-$(hostname -s)}
DOMAIN=${DOMAIN:-${$(hostname -d):-$(hostname -y)}}
+DEBUG=no
+
export USER HOST DOMAIN UID
if [ -d $ZDOTDIR ]; then
for script in $ZDOTDIR/??_*.zsh
do
- [ "$DEBUG" != "" ] && echo "${${script:t:r}/??_/}... ";
+ [ "$DEBUG" = "yes" ] && echo "${${script:t:r}/??_/}... ";
source $script
for i in "net:$DOMAIN" "host:$HOST" "user:$USER" "user:$SUDO_USER"
@@ -45,13 +47,14 @@ if [ -d $ZDOTDIR ]; then
specific_script=${script:h}/$i/${${script:t}/??_/}
if test -f $specific_script
then
+ [ "$DEBUG" = "yes" ] && echo "$i/${${specific_script:t:r}/??_/}... ";
source $specific_script
fi
done
done
fi
-if [ "`whoami`" = "root" ]
+if privileged_user
then
[ "`pwd`" = ~ ] && cd ~root
export HOME=~root