From 7bcf8b087c15a9b5d72021e3110e9cf4166e8cb5 Mon Sep 17 00:00:00 2001 From: merakor Date: Sun, 19 Apr 2020 20:02:45 +0000 Subject: 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. FossilOrigin-Name: edd082350847021c1cb6b0bba8aedb962204364dbd95c222985b2eee318792e8 --- kiss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kiss') diff --git a/kiss b/kiss index f08b195..f38e923 100755 --- a/kiss +++ b/kiss @@ -128,7 +128,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 -- cgit v1.2.3