function __source_startup_files() { # source the global configution file local __source_file="/etc/zshrc" if [ -r "$__source_file" ]; then source "$__source_file" fi local __source_dir if [ -n "$ZDOTDIR" ]; then __source_dir="$ZDOTDIR/.zsh" elif [ -n "$HOME" ]; then __source_dir="$HOME/.zsh" else return fi # source every file readable in .zsh for __source_file in $(find "$__source_dir" -type f -readable); do source "$__source_file" done } __source_startup_files unset __source_startup_files ulimit -c unlimited