Drop the case...esac and use if...else instead

This commit is contained in:
Stig-Ørjan Smelror 2024-01-29 21:46:15 +01:00
parent 14e18c89a1
commit b43f59847b

15
qsgen2
View File

@ -82,16 +82,11 @@ function _help() {
exit exit
} }
case ${1} in if [[ "$1" == "version" || "$1" == "-v" || "$1" == "--version" ]]; then
version || -v || --version) _version ${0:t}
_version ${0:t} elif [[ "$1" == "help" || "$1" == "-h" || "$1" == "--help" ]]; then
;; _help ${0:t}
help || -h || --help) fi
_help ${0:t}
;;
*)
continue
esac
# Loading Zsh modules # Loading Zsh modules
zmodload zsh/files zmodload zsh/files