From 04344bec779acce2b69487d63386191f54a9814f Mon Sep 17 00:00:00 2001 From: hugues Date: Wed, 16 May 2007 11:30:16 +0000 Subject: Petits correctifs git-svn-id: svn+ssh://hugues@maison/opt/svn/private/hugues@383 a0e5b806-a6f9-0310-978d-cbce73f8a913 --- .zshrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '.zshrc') 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 -- cgit v1.2.3