misc: nit

This commit is contained in:
Dylan Araps 2021-07-16 14:59:23 +03:00
parent b41a163101
commit 35be405279
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 4 additions and 15 deletions

19
kiss
View File

@ -234,22 +234,11 @@ pkg_find() {
unset IFS
# Show all search results if called from 'kiss search', else store the
# values in variables.
# values in variables. If there are 4 arguments, no package has been found.
case $2-$# in
*-4)
# 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.
return 1
;;
-*)
repo_dir=$5
;;
*)
shift 4
printf '%s\n' "$@";
;;
*-4) return 1 ;;
-*) repo_dir=$5 ;;
*) shift 4; printf '%s\n' "$@"
esac
}