diff --git a/release/bash/gupload b/release/bash/gupload index 8bacddf..24d71d2 100755 --- a/release/bash/gupload +++ b/release/bash/gupload @@ -705,7 +705,8 @@ _parser_setup_flag_help \ "Print help for all flags and basic usage instructions. To see help for a specific flag, --help flag_name ( with or without dashes ) - e.g: ${0##*/} --help aria" +Can also specify multiple flag names + e.g: ${0##*/} --help config list-accounts" _parser_setup_flag_preprocess 4<<'EOF' ################################################### # 1st arg - can be flag name @@ -714,14 +715,16 @@ _parser_setup_flag_preprocess 4<<'EOF' ################################################### _usage() { [ -n "${1}" ] && { - help_usage_usage="" - _flag_help "${1}" help_usage_usage + for flag_usage in "${@}"; do + help_usage_usage="" + _flag_help "${flag_usage}" help_usage_usage - if [ -z "${help_usage_usage}" ]; then - printf "%s\n" "Error: No help found for ${1}" - else - printf "%s\n%s\n%s\n" "${__PARSER_BAR}" "${help_usage_usage}" "${__PARSER_BAR}" - fi + if [ -z "${help_usage_usage}" ]; then + printf "%s\n" "Error: No help found for ${flag_usage}" + else + printf "%s\n%s\n%s\n" "${__PARSER_BAR}" "${help_usage_usage}" "${__PARSER_BAR}" + fi + done exit 0 } @@ -730,7 +733,7 @@ _usage() { } EOF _parser_setup_flag_process 4<<'EOF' -_usage "${2}" +shift 1 && _usage "${@}" EOF [ "${GUPLOAD_INSTALLED_WITH:-}" = script ]&&{ _parser_setup_flag "-u --update" 0 diff --git a/release/sh/gupload b/release/sh/gupload index 94a9dbe..e238a30 100755 --- a/release/sh/gupload +++ b/release/sh/gupload @@ -678,7 +678,8 @@ _parser_setup_flag_help \ "Print help for all flags and basic usage instructions. To see help for a specific flag, --help flag_name ( with or without dashes ) - e.g: ${0##*/} --help aria" +Can also specify multiple flag names + e.g: ${0##*/} --help config list-accounts" _parser_setup_flag_preprocess 4<<'EOF' ################################################### # 1st arg - can be flag name @@ -687,14 +688,16 @@ _parser_setup_flag_preprocess 4<<'EOF' ################################################### _usage() { [ -n "${1}" ] && { - help_usage_usage="" - _flag_help "${1}" help_usage_usage + for flag_usage in "${@}"; do + help_usage_usage="" + _flag_help "${flag_usage}" help_usage_usage - if [ -z "${help_usage_usage}" ]; then - printf "%s\n" "Error: No help found for ${1}" - else - printf "%s\n%s\n%s\n" "${__PARSER_BAR}" "${help_usage_usage}" "${__PARSER_BAR}" - fi + if [ -z "${help_usage_usage}" ]; then + printf "%s\n" "Error: No help found for ${flag_usage}" + else + printf "%s\n%s\n%s\n" "${__PARSER_BAR}" "${help_usage_usage}" "${__PARSER_BAR}" + fi + done exit 0 } @@ -703,7 +706,7 @@ _usage() { } EOF _parser_setup_flag_process 4<<'EOF' -_usage "${2}" +shift 1 && _usage "${@}" EOF [ "${GUPLOAD_INSTALLED_WITH:-}" = script ]&&{ _parser_setup_flag "-u --update" 0 diff --git a/src/common/upload-flags.sh b/src/common/upload-flags.sh index 481f31f..ae1c1c5 100644 --- a/src/common/upload-flags.sh +++ b/src/common/upload-flags.sh @@ -566,7 +566,8 @@ EOF "Print help for all flags and basic usage instructions. To see help for a specific flag, --help flag_name ( with or without dashes ) - e.g: ${0##*/} --help aria" +Can also specify multiple flag names + e.g: ${0##*/} --help config list-accounts" _parser_setup_flag_preprocess 4<< 'EOF' ################################################### @@ -576,14 +577,16 @@ To see help for a specific flag, --help flag_name ( with or without dashes ) ################################################### _usage() { [ -n "${1}" ] && { - help_usage_usage="" - _flag_help "${1}" help_usage_usage - - if [ -z "${help_usage_usage}" ]; then - printf "%s\n" "Error: No help found for ${1}" - else - printf "%s\n%s\n%s\n" "${__PARSER_BAR}" "${help_usage_usage}" "${__PARSER_BAR}" - fi + for flag_usage in "${@}"; do + help_usage_usage="" + _flag_help "${flag_usage}" help_usage_usage + + if [ -z "${help_usage_usage}" ]; then + printf "%s\n" "Error: No help found for ${flag_usage}" + else + printf "%s\n%s\n%s\n" "${__PARSER_BAR}" "${help_usage_usage}" "${__PARSER_BAR}" + fi + done exit 0 } @@ -593,7 +596,7 @@ _usage() { EOF _parser_setup_flag_process 4<< 'EOF' -_usage "${2}" +shift 1 && _usage "${@}" EOF ###################################################