Checking for global directory when looking for components that are not enabled

pull/1043/head
Nils Winkler 2017-09-15 08:10:15 +02:00
parent 752d4afe41
commit a925f5d58c
2 changed files with 7 additions and 3 deletions

View File

@ -12,7 +12,10 @@ _bash-it-comp-list-available-not-enabled()
local available_things=$(for f in `compgen -G "${BASH_IT}/$subdirectory/available/*.bash" | sort`;
do
if [ ! -e "${BASH_IT}/$subdirectory/enabled/"$(basename $f) ] && [ ! -e "${BASH_IT}/$subdirectory/enabled/"*$BASH_IT_LOAD_PRIORITY_SEPARATOR$(basename $f) ]
# TODO Find a better way to check for these, without using -e + glob
if [ ! -e "${BASH_IT}/$subdirectory/enabled/"$(basename $f) ] \
&& [ ! -e "${BASH_IT}/$subdirectory/enabled/"*$BASH_IT_LOAD_PRIORITY_SEPARATOR$(basename $f) ] \
&& [ ! -e "${BASH_IT}/enabled/"*$BASH_IT_LOAD_PRIORITY_SEPARATOR$(basename $f) ]
then
basename $f | cut -d'.' -f1
fi
@ -25,6 +28,7 @@ _bash-it-comp-list-enabled()
{
subdirectory="$1"
# TODO Check for global directory as well
local enabled_things=$(for f in `compgen -G "${BASH_IT}/$subdirectory/enabled/*.bash" | sort`;
do
basename $f | cut -d'.' -f1 | sed -e "s/^[0-9]*---//g"

View File

@ -9,5 +9,5 @@ if [ -z "${BASH_IT}" ]; then
export BASH_IT=$(cd ${test_directory} && dirname $(pwd))
fi
exec $bats_executable ${CI:+--tap} ${test_directory}/completion
# exec $bats_executable ${CI:+--tap} ${test_directory}/{bash_it,completion,install,lib,plugins,themes}
# exec $bats_executable ${CI:+--tap} ${test_directory}/completion
exec $bats_executable ${CI:+--tap} ${test_directory}/{bash_it,completion,install,lib,plugins,themes}