From 91b39a0f979cf25403582f24abb4b0246680c3c7 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 8 Jul 2021 13:04:28 +0300 Subject: [PATCH] kiss: remove reverse ordering for kiss r (needs to be replaced) --- kiss | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kiss b/kiss index 6390f94..9553be7 100755 --- a/kiss +++ b/kiss @@ -1502,7 +1502,7 @@ args() { esac ;; - b|build|c|checksum|d|download|i|install|l|list|r|remove) + b|build|c|checksum|d|download|i|install|l|list) case ${action%%"${action#?}"}-$* in i-*\!*|i-*\**|i-*\[*|i-*\]*) die "Arguments contain invalid characters: '!*[]' ($*)" @@ -1528,6 +1528,12 @@ args() { # shellcheck disable=2046,2086 set -- $order ;; + + r|remove) + case $* in *\**|*\!*|*\[*|*\]*|*/*) + die "Invalid argument: '!*[]/' ($*)" + esac + ;; esac # Rerun the script as root with a fixed environment if needed. We sadly @@ -1597,7 +1603,7 @@ args() { b|build) pkg_build_all "${@:?No packages installed}" ;; d|download) for pkg do pkg_source "$pkg"; done ;; l|list) pkg_list "$@" ;; - r|remove) for pkg in $redro; do pkg_remove "$pkg"; done ;; + r|remove) for pkg do pkg_remove "$pkg"; done ;; s|search) for pkg do pkg_find "$pkg" all; done ;; u|update) pkg_updates ;; v|version) printf '5.4.8\n' ;;