5 # Written by Joerg Jaspert <joerg@debian.org>
9 # Base directory for all plugins, themes, functions, whatever
14 [[ "${DEBUG}" = "no" ]] && return
17 echo ${nl} "${msg}$reset_color"
20 # May want to use colors in log output...
21 [[ "${DEBUG}" = "no" ]] && autoload -U colors && colors
24 autoload -Uz zrecompile
25 zrecompile -q -p -R ${ZDOTDIR}/.zshrc -- -M ${ZDOTDIR}/var/.zcompdump
27 # Idea copied from https://github.com/hugues/zdotdir/blob/master/zshrc
28 # AUTHOR: Hugues Hiegel <hugues@hiegel.fr>
29 # Most of my config is splitted into files and directories
30 if [ -d ${ZDOTDIR} ]; then
31 for script in ${ZDOTDIR}/??_*.zsh; do
32 debug "Loading ${${script:t:r}/??_/}... " -n
33 zrecompile -q -p -U -R ${script}
35 debug "$fg_no_bold[green]done"
36 for i in "net:$DOMAIN" \
42 "net:$DOMAIN/host:$HOST" \
43 "net:$DOMAIN/sys:$OSNAME" \
44 "net:$DOMAIN/distri:$DISTRI" \
45 "net:$DOMAIN/user:$USER" \
46 "net:$DOMAIN/user:$SUDO_USER" \
47 "net:$DOMAIN/host:$HOST/sys:$OSNAME" \
48 "net:$DOMAIN/host:$HOST/distri:$DISTRI" \
49 "net:$DOMAIN/host:$HOST/user:$USER" \
50 "net:$DOMAIN/host:$HOST/user:$SUDO_USER" \
51 "net:$DOMAIN/host:$HOST/sys:$OSNAME" \
52 "net:$DOMAIN/host:$HOST/sys:$OSNAME/distri:$DISTRI" \
53 "net:$DOMAIN/host:$HOST/sys:$OSNAME/user:$USER" \
54 "net:$DOMAIN/host:$HOST/sys:$OSNAME/user:$SUDO_USER" \
55 "host:$HOST/sys:$OSNAME" \
56 "host:$HOST/distri:$DISTRI" \
57 "host:$HOST/user:$USER" \
58 "host:$HOST/user:$SUDO_USER" \
59 "host:$HOST/sys:$OSNAME/distri:$DISTRI" \
60 "host:$HOST/sys:$OSNAME/user:$USER" \
61 "host:$HOST/sys:$OSNAME/user:$SUDO_USER"
63 specific_script=${script:h}/$i/${${script:t}/??_/}
64 #debug "Checking $specific_script... "
65 if [ -r ${specific_script} ]; then
66 debug "Loading $i/${${specific_script:t:r}/??_/}... " -n
67 zrecompile -q -p -U -R ${specific_script}
68 source ${specific_script}
69 debug "$fg_no_bold[green]done"
76 if [ ! -z "$SUDO_USER" ]; then
78 [ "`pwd`" = ~$SUDO_USER ] && cd