From 35d97853deca06b1f029e155f983a95fd8c5036c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 14 Sep 2020 12:41:28 +0300 Subject: [PATCH] kiss: small changes to pkg_find --- kiss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kiss b/kiss index 944c397..7af1fcf 100755 --- a/kiss +++ b/kiss @@ -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