summaryrefslogtreecommitdiff
path: root/zshrc
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@openwide.fr>2009-06-05 11:11:05 +0200
committerHugues Hiegel <hugues.hiegel@openwide.fr>2009-06-05 11:11:05 +0200
commit480e555229ff44478b9b3bdc3d2eee78c9ca8130 (patch)
treeda85dcbc90d383262f576348bf9673cd9eb3bc58 /zshrc
parent8865b771cf355eb00466e9b0f501c14f9979e144 (diff)
parentbcd0823d15c93d0c6ec404860bb45aa8b4e6d283 (diff)
Merge branch 'master' of maison:/git/zdotdir
Diffstat (limited to 'zshrc')
-rw-r--r--zshrc13
1 files changed, 12 insertions, 1 deletions
diff --git a/zshrc b/zshrc
index 01700cb..657a810 100644
--- a/zshrc
+++ b/zshrc
@@ -14,6 +14,7 @@
#
# If you want to make user, host or network specific configurations,
# add your specific scripts to the folders
+# - "sys:$(uname -s)" for OS-specific conf,
# - "user:$(whoami)" for user-specific conf,
# - "host:$(hostname -s)" for host-specific conf,
# - "net:$(domainname)" for network-specific conf,
@@ -28,6 +29,7 @@ mkdir -p $ZDOTDIR
# Useful environment variables which may be used
# at any time - We compute them now to avoid calling
# the required processes each time we'll need.
+OSNAME=`uname -s`
USER=${USER:-`whoami`}
UID=${UID:-`id -u`}
HOST=$HOST:r
@@ -49,15 +51,24 @@ if [ -d $ZDOTDIR ]; then
for i in "net:$DOMAIN"\
"host:$HOST"\
+ "sys:$OSNAME"\
"user:$USER"\
"user:$SUDO_USER"\
"net:$DOMAIN/host:$HOST"\
+ "net:$DOMAIN/sys:$OSNAME"\
"net:$DOMAIN/user:$USER"\
"net:$DOMAIN/user:$SUDO_USER"\
+ "net:$DOMAIN/host:$HOST/sys:$OSNAME"\
"net:$DOMAIN/host:$HOST/user:$USER"\
"net:$DOMAIN/host:$HOST/user:$SUDO_USER"\
+ "net:$DOMAIN/host:$HOST/sys:$OSNAME"\
+ "net:$DOMAIN/host:$HOST/sys:$OSNAME/user:$USER"\
+ "net:$DOMAIN/host:$HOST/sys:$OSNAME/user:$SUDO_USER"\
+ "host:$HOST/sys:$OSNAME"\
"host:$HOST/user:$USER"\
- "host:$HOST/user:$SUDO_USER"
+ "host:$HOST/user:$SUDO_USER"\
+ "host:$HOST/sys:$OSNAME/user:$USER"\
+ "host:$HOST/sys:$OSNAME/user:$SUDO_USER"
do
specific_script=${script:h}/$i/${${script:t}/??_/}
if test -f $specific_script