]> git.corax.cc Git - toolbox/commitdiff
include/opt: Remove summary of short options from help text
authorMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 18:04:19 +0000 (03:04 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 18:04:19 +0000 (03:04 +0900)
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.

include/opt.sh

index 5b357d9d0b5293c78ac75389f9740d3886d7ebee..6bb67382b628933d3b8f0e86ccea66a5a53a619d 100644 (file)
@@ -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"