kiss: use '-x' and '-d' flags in pkg_find instead of '-e'

'-e' flag applies to everything that exists, which is not ideal.
This can, for example, also show README files on personal repositories.
Since our target is user-scripts and package directories, checking
if the target is executable is the best overall solutions as most
directories are also marked executable. This change makes sure we
get what we want while keeping other files out of pkg_find.

Signed-off-by: Dylan Araps <dylan.araps@gmail.com>
This commit is contained in:
Cem Keylan 2020-04-19 23:02:46 +03:00 committed by Dylan Araps
parent df6c55e439
commit 866860eac7
1 changed files with 1 additions and 1 deletions

2
kiss
View File

@ -125,7 +125,7 @@ pkg_find() {
set +f
for path2 in "$path/"$query; do
[ -e "$path2" ] && set -f -- "$@" "$path2"
[ -x "$path2" ] || [ -d "$path2" ] && set -f -- "$@" "$path2"
done
done