cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit b2dd5198f20e7dbbe45a156e4fdb45c8a75ac539
parent 0e183d30a387d9fe72554ec8903cc79ba48f7724
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Wed, 24 Jul 2019 02:45:20 +0300

search: Allow \*, ?, etc etc

Diffstat:
Mkiss | 15+++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/kiss b/kiss @@ -970,11 +970,22 @@ args() { pkg_updates ;; - # Search packages + # Search for packages. s*) shift [ "$1" ] || die "'kiss search' requires an argument." - for pkg; do pkg_search "$pkg"; done + + for pkg; do + # Create a list of all matching packages. + set -- $(IFS=:; find $KISS_PATH -mindepth 1 \ + -maxdepth 1 -name "$pkg") + + # Print all matches. If there aren't any, print an error. + printf '%s\n' "${@:-$(log "[$pkg] Not installed.")}" + + # Exit with an error if a search fails. + [ "$1" ] || exit 1 + done ;; # Print version and exit.