Useful when debugging which file gets loaded.
# Load environmental related settings used by all shells.
if [ -f ~/.shell/env ]; then
source ~/.shell/env
+# Fallback functions as ~/.shell/env couldn't be loaded.
else
+ function source_debug() {
+ echo $@
+ }
function source_config() {
echo "Couldn't load source_config(), can't source files." >&2
}
fi
+source_debug "sourcing ~/.bash/rc"
+
# Load global env file for current hostname (first part before a dot) or
# global env.local.
source_config ~/.shell "" env $host
# Load rc file for current hostname (first part before a dot) or rc.local.
source_config ~/.bash host rc $host
+
+source_debug "finished sourcing ~/.bash/env"
}
+source_debug "sourcing ~/.shell/env"
+
# Use UTF-8 encoding in the terminal.
LC_ALL=en_US.UTF-8
LANG=$LC_ALL
elif [ -f $source_file_local -a x$5 != xnolocal ]; then
source_debug "source_config(): sourcing $source_file_local"
source $source_file_local
+ else
+ source_debug "source_config(): neither exists"
fi
}
+
+source_debug "finished sourcing ~/.shell/env"
loaded zsh/host/rc.zucker
source_config(): checking if tmp/zsh/os/env.Darwin exists
source_config(): checking if tmp/zsh/env.local exists
+source_config(): neither exists
source_config(): checking if tmp/zsh/host/env.zucker exists
source_config(): checking if tmp/zsh/env.local exists
source_config(): sourcing tmp/zsh/env.local
loaded zsh.env.local
source_config(): checking if tmp/bash/host/rc.zucker exists
source_config(): checking if tmp/bash/rc.local exists
+source_config(): neither exists
source_config(): checking if tmp/shell//env.zucker exists
source_config(): checking if tmp/shell/env.local exists
source_config(): sourcing tmp/shell//env.zucker
# Load environmental related settings used by all shells.
if [[ -f ~/.shell/env ]]; then
source ~/.shell/env
+# Fallback functions as ~/.shell/env couldn't be loaded.
else
+ function source_debug() {
+ echo $@
+ }
function source_config() {
echo "Couldn't load source_config(), can't source files." >&2
}
fi
+source_debug "sourcing ~/.zsh/env"
+
# Load global env file for current hostname (first part before a dot) or
# global env.local.
source_config ~/.shell "" env $host
source_config ~/.zsh os env $(uname) nolocal
# Load env file for current hostname (first part before a dot) or env.local.
source_config ~/.zsh host env $host
+
+source_debug "finished sourcing ~/.zsh/env"
# Zsh configuration file.
+source_debug "sourcing ~/.zsh/rc"
+
# MISCELLANEOUS SETTINGS
# Use Vi(m) style key bindings.
source_config ~/.zsh os rc $(uname) nolocal
# Load rc file for current hostname (first part before a dot) or rc.local.
source_config ~/.zsh host rc ${$(hostname)//.*/}
+
+source_debug "finished sourcing ~/.zsh/rc"