diff options
author | merakor <cem@ckyln.com> | 2020-04-19 20:02:45 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-04-19 20:02:45 +0000 |
commit | 7bcf8b087c15a9b5d72021e3110e9cf4166e8cb5 (patch) | |
tree | 9c7ded448e1d1af248ba15f3dc511b4403d13e5e /kiss | |
parent | 19cee3a2e1cc7af20365f63548dfb21560790d2a (diff) | |
download | cpt-7bcf8b087c15a9b5d72021e3110e9cf4166e8cb5.tar.gz |
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
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |