summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorhugues <hugues@a0e5b806-a6f9-0310-978d-cbce73f8a913>2006-08-20 19:55:05 +0000
committerHugues Hiegel <hugues@hiegel.fr>2008-03-07 14:15:09 +0100
commit21cac963025b544e71bab2e2f9277e28fcb00c47 (patch)
tree2f73384b2dae4cb82d66af6be3e80acd5057ca86 /.zshrc
parent46ac6b2c967768aafe50a5446aab2241ddbcff69 (diff)
Grand Ménage.... (pff j'oublie tt le temps des trucs..)
git-svn-id: svn+ssh://hugues@maison/opt/svn/private/hugues@256 a0e5b806-a6f9-0310-978d-cbce73f8a913
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc53
1 files changed, 29 insertions, 24 deletions
diff --git a/.zshrc b/.zshrc
index 64503a3..b2639a9 100644
--- a/.zshrc
+++ b/.zshrc
@@ -1,34 +1,40 @@
-
-ZDOTDIR=~/.zsh
-
##
## THIS FILE IS NOT INTENDED TO BE MODIFIED ! READ ABOVE...
##
-## Instead, add/edit your configuration files inside $ZDOTDIR.
-##
-## If you want to add a file, name it specifically in the form
-##
-## $ZDOTDIR/??_*.zsh
-##
-## Where "??" should be a two-digits number.
-## With that, file ``10_Toto.zsh'' would be parsed before
-## file ``20_Tutu.zsh'', allowing you to organize your scripts.
-##
-## If you want to make host-specific configurations, create a
-## file named with the root of your configuration file, and
-## append to it ".$(hostname -s)". (replace "zsh" by the hostname.
-## if you have a computer named "zsh", well....... :-) )
-## For example, for specific configuration for the host HAL in
-## the file 10_Toto.zsh, you would create a file named 10_Toto.HAL
-##
+#
+# Instead, add/edit your configuration files inside $ZDOTDIR.
+#
+# If you want to add a file, name it specifically in the form
+#
+# $ZDOTDIR/??_*.zsh
+#
+# Where "??" should be a two-digit number.
+# With that, file ``10_Toto.zsh'' would be parsed before
+# file ``20_Tutu.zsh'', allowing you ordering your scripts.
+#
+# If you want to make host-specific configurations, create a
+# file named with the root of your configuration file, and
+# append to it ".$(hostname -s)". (replace "zsh" by the hostname.
+# if you have a computer named "zsh", well....... :-) )
+# For example, for specific configuration for the host HAL in
+# the file 10_Toto.zsh, you would create a file named 10_Toto.HAL
+#
+
+ZDOTDIR=${ZDOTDIR:-~/.zsh}
+mkdir -p $ZDOTDIR
if [ -d $ZDOTDIR ]; then
for script in $ZDOTDIR/??_*.zsh
do
+
+ [ "$DEBUG" != "" ] && echo "${${script:t:r}/??_/}... ";
source $script
- # find host-based script and source it
- local_script="${script:r}.`hostname -s`"
- [ -f $local_script ] && source $local_script
+
+ for i in "host:`hostname -s`" "user:`whoami`" #"host:`hostname -s`.user:`whoami`"
+ do
+ specific_script=${script:h}/$i/${script:t}
+ [ -f $specific_script ] && source $specific_script
+ done
done
fi
@@ -36,6 +42,5 @@ if [ "`whoami`" = "root" ]
then
[ "`pwd`" = ~ ] && cd ~root
export HOME=~root
- HISTFILE=$HISTFILE.root
fi