kiss: small changes to pkg_find

This commit is contained in:
Dylan Araps 2020-09-14 12:41:28 +03:00
parent d9c8725169
commit 35d97853de
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 5 additions and 5 deletions

10
kiss
View File

@ -131,14 +131,14 @@ pkg_find() {
set --
# shellcheck disable=2086
# Globbing disabled for KISS_PATH word-splitting
for path in $KISS_PATH "${what:-"$sys_db"}"; do
set +f
for path2 in "$path/"$query; do
test "${what:--d}" "$path2" || continue
set -f -- "$@" "$path2"
# Globbing enabled for search.
for path2 in "$path/"${query%%/*}; do
test "${what:--d}" "$path2" &&
set -f -- "$@" "$path2"
done
done