kiss: fix globs

This commit is contained in:
Dylan Araps 2021-07-06 22:00:43 +03:00
parent 837148bc9b
commit 0c51261486
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

12
kiss
View File

@ -1498,19 +1498,19 @@ args() {
# not be used here as they would conflict with kiss extensions. # not be used here as they would conflict with kiss extensions.
case $action in case $action in
a|alternatives) a|alternatives)
case $1 in */*|*\**|*\!*|*\[*|*\]*) case $1 in *\**|*\!*|*\[*|*\]*|*' '*|*/*)
die "Invalid argument: '/!*[]' ($1)" die "Invalid argument: '!*[] /' ($1)"
esac esac
;; ;;
b|build|c|checksum|d|download|i|install|l|list|r|remove) b|build|c|checksum|d|download|i|install|l|list|r|remove)
case ${action%%"${action#?}"}-$* in case ${action%%"${action#?}"}-$* in
i-*[\*\!\[\]]*) i-*\!*|i-*\**|i-*\[*|i-*\]*|i-*' '*)
die "Arguments contain invalid characters: '!*[]' ($*)" die "Arguments contain invalid characters: '!*[] ' ($*)"
;; ;;
[!i]-*[\*\!\[\]/]*) [!i]-*\!*|[!i]-*\**|[!i]-*\[*|[!i]-*\]*|[!i]-*' '*|[!i]-*/*)
die "Arguments contain invalid characters: '!*[]/' ($*)" die "Arguments contain invalid characters: '!*[] /' ($*)"
;; ;;
[!l]-) [!l]-)