finish smart_find

This commit is contained in:
fabolous005 2024-09-13 20:53:14 +02:00
parent 15f36caa5f
commit ee614d2c2a
2 changed files with 3 additions and 5 deletions

1
etools
View File

@ -35,6 +35,7 @@ function etools_smart_find() {
fi
# unset helper functions
./helper.sh
unset _etools_packages
}

View File

@ -33,11 +33,9 @@ function _formatted_find() {
function _set_weights() {
for package in "${!_etools_packages[@]}"; do
# $function "$key"
echo iterated
# TODO: figure out why this is not in scope
for regex in $package_weights; do
echo iterated inner
if [[ ${package//\"/} =~ *${regex}* ]]; then
for regex in ${!package_weights[@]}; do
if [[ ${package//\"/} =~ ^*${regex}*$ ]]; then
_etools_packages[${package//\"/}]=${package_weights[$regex]}
fi
done
@ -78,7 +76,6 @@ function _filter() {
# leave warning untils this is stable/fixed
for function in \
_set_weights \
_etools_print_assoc_array \
${functions[@]};
do
$function