forgot to add latest changes

This commit is contained in:
fabolous005 2024-09-15 17:03:10 +02:00
parent d125ef59be
commit f68f45999a
3 changed files with 31 additions and 6 deletions

View File

@ -28,7 +28,7 @@ function _configure() {
# The Argyments passed to the find command # The Argyments passed to the find command
ETOOLS_FIND_ARGS=${ETOOLS_FIND_ARGS:-''' ETOOLS_FIND_ARGS=${ETOOLS_FIND_ARGS:-'''
--exclude profiles --exclude scripts --exclude eclass --exclude metadata --exclude profiles --exclude scripts --exclude eclass --exclude metadata
--exclude dev-perl --exclude dev-ml --exclude dev-perl --exclude dev-ml --exclude app-doc
--exclude app-emacs --exclude dev-ruby --exclude acct-user --exclude acct-group --exclude app-emacs --exclude dev-ruby --exclude acct-user --exclude acct-group
--type directory --format '"\"{}\""' --max-depth 3 --case-sensitive'''} --type directory --format '"\"{}\""' --max-depth 3 --case-sensitive'''}

23
etools.conf Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
# shellcheck disable=SC2034
declare -Ag package_weights
package_weights["-bin"]=-10
package_weights["dev-cpp"]=-3
package_weights["dev-python"]=-5
package_weights["dev-haskell"]=-15
package_weights["gnustep-base"]=-5
ETOOLS_DEBUG=false
# function etools_find_sort_custom() {
# for package in "${!_etools_packages[@]}"; do
# if [[ $package =~ -bin ]]; then
# _etools_packages["$package"]=$((_etools_packages["$package"] - 30))
# fi
# done
# }
# vim: filetype=sh

View File

@ -76,17 +76,19 @@ function _get_high() {
} }
function _most_probable() { function _most_probable() {
# echo $* (( $# == 2 )) && echo "${2//\"/}" && return 0;
# echo $#
# echo $1 # TODO: maybe don't just test trailing match, but rather excact package name first
# echo $2 # eg.: dev-util/devhelp < example/help
(( $# == 2 )) && echo "$2" && return 0;
for package in "${@:2}"; do for package in "${@:2}"; do
# echo "$package" # echo "$package"
if [[ ${package//\"/} == *"$1" ]]; then if [[ ${package//\"/} == *"$1" ]]; then
echo "${package//\"/}" && return 0; echo "${package//\"/}" && return 0;
fi fi
done done
# INFO: at this point we're lucky guessing
echo "${2//\"/}"
} }
function _default_sort() { function _default_sort() {