# Set up _base, _self first # Keep track of which config set is loaded, to avoid loading a config set more than once if [ -z "${__BASH_CONFIG_LOADED}" ] || echo "${__BASH_CONFIG_LOADED}" | grep -qv " ${_self} " then __BASH_CONFIG_LOADED="${__BASH_CONFIG_LOADED} ${_self} " # Interactive shell? _i() { [[ $- == *i* ]]; return $?; } # Include all subfiles, in lexicographical order eval $(find "${_base}/${_self}.d/" -type f | sort | sed -e 's/^/source /; s/$/;/') unset _base _self _i fi