5 # Written by Joerg Jaspert <joerg@debian.org>
9 # Base directory for all plugins, themes, functions, whatever
12 if [[ ${DEBUG} != no ]]; then
14 [[ "${DEBUG}" = "no" ]] && return
17 echo ${nl} "${msg}$reset_color"
21 # May want to use colors in log output...
22 autoload -U colors && colors
27 if zstyle -T ':ganneff:config' zrecompile; then
28 autoload -Uz zrecompile
29 zrecompile -q -p -R ${ZDOTDIR}/.zshrc -- -M ${ZDOTDIR}/var/.zcompdump
31 zrecompile -q -p -U -R ${1}
37 # Idea copied from https://github.com/hugues/zdotdir/blob/master/zshrc
38 # AUTHOR: Hugues Hiegel <hugues@hiegel.fr>
39 # Most of my config is splitted into files and directories
40 if [ -d ${ZDOTDIR} ]; then
41 for script in ${ZDOTDIR}/??_*.zsh; do
43 debug "Loading ${lscript/??_/}... " -n
44 maybe_compile ${script}
46 debug "$fg_no_bold[green]done"
47 for i in "net:$DOMAIN" \
53 "net:$DOMAIN/host:$HOST" \
54 "net:$DOMAIN/sys:$OSNAME" \
55 "net:$DOMAIN/distri:$DISTRI" \
56 "net:$DOMAIN/user:$USER" \
57 "net:$DOMAIN/user:$SUDO_USER" \
58 "net:$DOMAIN/host:$HOST/sys:$OSNAME" \
59 "net:$DOMAIN/host:$HOST/distri:$DISTRI" \
60 "net:$DOMAIN/host:$HOST/user:$USER" \
61 "net:$DOMAIN/host:$HOST/user:$SUDO_USER" \
62 "net:$DOMAIN/host:$HOST/sys:$OSNAME" \
63 "net:$DOMAIN/host:$HOST/sys:$OSNAME/distri:$DISTRI" \
64 "net:$DOMAIN/host:$HOST/sys:$OSNAME/user:$USER" \
65 "net:$DOMAIN/host:$HOST/sys:$OSNAME/user:$SUDO_USER" \
66 "host:$HOST/sys:$OSNAME" \
67 "host:$HOST/distri:$DISTRI" \
68 "host:$HOST/user:$USER" \
69 "host:$HOST/user:$SUDO_USER" \
70 "host:$HOST/sys:$OSNAME/distri:$DISTRI" \
71 "host:$HOST/sys:$OSNAME/user:$USER" \
72 "host:$HOST/sys:$OSNAME/user:$SUDO_USER"
74 specific_script=${script:h}/$i/${${script:t}/??_/}
75 #debug "Checking $specific_script... "
76 if [ -r ${specific_script} ]; then
77 debug "Loading $i/${${specific_script:t:r}/??_/}... " -n
78 maybe_compile ${specific_script}
79 source ${specific_script}
80 debug "$fg_no_bold[green]done"
83 if [[ -f ${ZDOTDIR}/${lscript}.zsh.local ]]; then
84 debug "Loading local ${lscript/??_/}... " -n
85 maybe_compile ${lscript}.zsh.local
86 source ${script}.local
87 debug "$fg_no_bold[green]done"
93 if [ ! -z "$SUDO_USER" ]; then
95 [ "`pwd`" = ~$SUDO_USER ] && cd
98 [[ -f ${ZDOTDIR}/.zshlate ]] && source ${ZDOTDIR}/.zshlate || /bin/true