From: Matthias Kruk Date: Thu, 11 Aug 2022 18:04:19 +0000 (+0900) Subject: include/opt: Remove summary of short options from help text X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=eee92af5da5e8c7f9c18e4c71f9714254a041f3c;p=toolbox include/opt: Remove summary of short options from help text The help text displayed by the opt module contains a summary of all short options in the title. However, a cursory search showed that most commandline tools don't do that. Thus, this "feature" may be removed. This commit removes the summary of short options from the title of the help text. --- diff --git a/include/opt.sh b/include/opt.sh index 5b357d9..6bb6738 100644 --- a/include/opt.sh +++ b/include/opt.sh @@ -133,15 +133,8 @@ opt_add_arg() { opt_print_help() { local short - local shortopts - shortopts="" - - for short in $(array_sort "${__opt_short[@]}"); do - shortopts+="$short" - done - - echo "Usage: ${0##*/} [-$shortopts]" + echo "Usage: ${0##*/} [OPTIONS]" echo "" echo "Options"