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

11
qsgen2
View File

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