Fix reload function to use the old and the new directory

This commit is contained in:
Nils Winkler
2017-09-15 08:10:14 +02:00
parent e705e6c60f
commit f892269aff

View File

@@ -16,6 +16,20 @@ function _load_bash_it_files() {
fi fi
done done
fi fi
# In the new structure
if [ -d "${BASH_IT}/enabled" ]
then
local suffix=$(echo "$subdirectory" | sed -e 's/plugins/plugin/g')
FILES="${BASH_IT}/enabled/*.${suffix}.bash"
for config_file in $FILES
do
if [ -e "${config_file}" ]; then
source $config_file
fi
done
fi
} }
# Function for reloading aliases # Function for reloading aliases