diff --git a/completion/available/bash-it.completion.bash b/completion/available/bash-it.completion.bash index 6bea15a6..408c2bf6 100644 --- a/completion/available/bash-it.completion.bash +++ b/completion/available/bash-it.completion.bash @@ -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" diff --git a/test/run b/test/run index be0df470..f02f9951 100755 --- a/test/run +++ b/test/run @@ -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}