2014-03-07 16:38:23 -08:00
|
|
|
# load custom executable functions
|
2013-03-01 23:32:03 -05:00
|
|
|
for function in ~/.zsh/functions/*; do
|
|
|
|
source $function
|
|
|
|
done
|
|
|
|
|
2014-07-22 16:51:20 +02:00
|
|
|
# extra files in ~/.zsh/configs/pre , ~/.zsh/configs , and ~/.zsh/configs/post
|
|
|
|
# these are loaded first, second, and third, respectively.
|
|
|
|
_load_settings() {
|
|
|
|
_dir="$1"
|
|
|
|
if [ -d "$_dir" ]; then
|
|
|
|
if [ -d "$_dir/pre" ]; then
|
2018-10-24 07:42:23 +01:00
|
|
|
for config in "$_dir"/pre/**/*~*.zwc(N-.); do
|
2014-07-22 16:51:20 +02:00
|
|
|
. $config
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2014-10-03 10:28:08 -07:00
|
|
|
for config in "$_dir"/**/*(N-.); do
|
2014-07-22 16:51:20 +02:00
|
|
|
case "$config" in
|
2018-10-24 07:42:23 +01:00
|
|
|
"$_dir"/(pre|post)/*|*.zwc)
|
2014-07-22 16:51:20 +02:00
|
|
|
:
|
|
|
|
;;
|
|
|
|
*)
|
2018-10-24 07:42:23 +01:00
|
|
|
. $config
|
2014-07-22 16:51:20 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -d "$_dir/post" ]; then
|
2018-10-24 07:42:23 +01:00
|
|
|
for config in "$_dir"/post/**/*~*.zwc(N-.); do
|
2014-07-22 16:51:20 +02:00
|
|
|
. $config
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
_load_settings "$HOME/.zsh/configs"
|
|
|
|
|
2013-07-07 15:55:41 -07:00
|
|
|
# Local config
|
|
|
|
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local
|
2017-01-15 13:08:42 +00:00
|
|
|
|
|
|
|
# aliases
|
|
|
|
[[ -f ~/.aliases ]] && source ~/.aliases
|