diff --git a/scripts/reloader.bash b/scripts/reloader.bash index 66236042..e5cf178f 100644 --- a/scripts/reloader.bash +++ b/scripts/reloader.bash @@ -4,7 +4,11 @@ pushd "${BASH_IT}" >/dev/null || exit 1 # TODO: Add debugging output if [ "$1" != "false" ] && [ -d "./enabled" ]; then - for _bash_it_config_file in $(sort <(compgen -G "./enabled/*${1}.bash")); do + _bash_it_config_type="" + if [[ "${1}" =~ ^(alias|completion|plugin)$ ]]; then + _bash_it_config_type=$1 + fi + for _bash_it_config_file in $(sort <(compgen -G "./enabled/*${_bash_it_config_type}.bash")); do if [ -e "${_bash_it_config_file}" ]; then # shellcheck source=/dev/null source $_bash_it_config_file @@ -28,4 +32,5 @@ if [ ! -z "${2}" ] && [ -d "${2}/enabled" ]; then fi unset _bash_it_config_file +unset _bash_it_config_type popd >/dev/null || exit 1