diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-02-19 16:27:12 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-02-19 16:27:12 +0000 |
commit | 7d7270ae4ea1d36dec85f17b59ef2797020c6556 (patch) | |
tree | 0e56a6ad2f17e9587d4a7cce4cddbd84fb3fb175 | |
parent | b66580b8bb2cd27f179c4ccd2ed6fbda72d824ef (diff) | |
download | cpt-7d7270ae4ea1d36dec85f17b59ef2797020c6556.tar.gz |
kiss: Fix files appearing in kiss search
FossilOrigin-Name: be5039240972c1466717a83bd19533515bdded849c63fb348fd3b713b2cfb6b2
-rwxr-xr-x | kiss | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -116,10 +116,13 @@ pkg_find() { # Find the repository containing a package. # Searches installed packages if the package is absent - # from the repositories. + # from the repositories. This ugly mess is thanks to POSIX + # find which has no '-mindepth'/'-maxdepth', etc. + # See: https://unix.stackexchange.com/a/330372 # See [1] at top of script. # shellcheck disable=2046,2086 - set -- $(find "$@" "$sys_db/." \( ! -name . -prune \) -name "$query") + set -- $(find "$@" "$sys_db/." \( ! -name . -prune \) \ + ! -name .git -a -name "$query" -type d) # A package may also not be found due to a repository not being # readable by the current user. Either way, we need to die here. |