Fix reload function to use the old and the new directory

pull/1043/head
Nils Winkler 2017-09-15 08:10:14 +02:00
parent e705e6c60f
commit f892269aff
1 changed files with 14 additions and 0 deletions

View File

@ -16,6 +16,20 @@ function _load_bash_it_files() {
fi
done
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