style(quickget): drop shorthand arguments for consistency

quickemu has long hand command line arguments only. This commit removes the short hand arguments from the expanded capabilities introduced in quickget 4.9.3, so that both tools have a consistent user experience.
This commit is contained in:
Martin Wimpress 2024-05-07 10:27:10 +01:00 committed by Martin Wimpress
parent e0e23864c8
commit c981e8b8e5
1 changed files with 11 additions and 18 deletions

View File

@ -3456,34 +3456,35 @@ if [ ! -e "${CURL}" ]; then
fi fi
CURL_VERSION=$("${CURL}" --version | head -1 | cut -d' ' -f2) CURL_VERSION=$("${CURL}" --version | head -1 | cut -d' ' -f2)
#TODO: Deprecate `list`, `list_csv`, and `list_json` in favor of `--list`, `--list-csv`, and `--list-json`
case "${1}" in case "${1}" in
-1*|-2*|-3*|-4*|-5*) -1*|-2*|-3*|-4*|-5*)
show_os_info "${1}" "${2}" show_os_info "${1}" "${2}"
exit 0 exit 0
;; ;;
'--download'|'-d') --download|-download)
OPERATION="download" OPERATION="download"
shift shift
;; ;;
'--create-config'|'-cc') --create-config|-create-config)
OPERATION="config" OPERATION="config"
shift shift
create_config "${@}" create_config "${@}"
;; ;;
'--open-homepage'|'-o') --open-homepage|-open-homepage)
shift shift
open_homepage "${1}" open_homepage "${1}"
;; ;;
'--version'|'-v') --version|-version)
WHERE=$(dirname "${BASH_SOURCE[0]}") WHERE=$(dirname "${BASH_SOURCE[0]}")
"${WHERE}/quickemu" --version "${WHERE}/quickemu" --version
exit 0 exit 0
;; ;;
'--help'|'-h') --help|-help|--h|-h)
help_message help_message
exit 0 exit 0
;; ;;
'--url'|'-u') --url|-url)
OPERATION="show" OPERATION="show"
shift shift
if [ -z "${1}" ]; then if [ -z "${1}" ]; then
@ -3496,7 +3497,7 @@ case "${1}" in
exit 0 exit 0
fi fi
;; ;;
'--check'|'-c') --check|-check)
OPERATION="test" OPERATION="test"
shift shift
if [ -z "${1}" ]; then if [ -z "${1}" ]; then
@ -3508,17 +3509,9 @@ case "${1}" in
fi fi
exit 0 exit 0
;; ;;
#TODO: Argument without dashes should be DEPRECATED! --list-csv|-list-csv|list|list_csv) list_csv;;
'--list-csv'|'-lc'|'list'|'list_csv'|'lc') --list-json|-list-json|list_json) list_json;;
list_csv --list|-list) list_supported;;
;;
#TODO: Argument without dashes should be DEPRECATED!
'--list-json'|'-lj'|'list_json')
list_json
;;
'--list'|'-l')
list_supported
;;
-*) -*)
error_not_supported_argument error_not_supported_argument
;; ;;