From 0004080a79b500c85f8fda614e434c3e68ca7147 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 20 Jan 2022 13:21:36 -0300 Subject: src/td.in: Put options in help message and getopts arguments in the same order --- src/td.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/td.in b/src/td.in index f21c03f..6ab9491 100755 --- a/src/td.in +++ b/src/td.in @@ -9,7 +9,7 @@ add_msg() { MSG_USAGE="$(cat <<-'EOF' Usage: - @NAME@ [-c] [-t TYPE] [-m MESSAGE] + @NAME@ [-c] [-m MESSAGE] [-t TYPE] @NAME@ [-HlL] @NAME@ [-hV] EOF @@ -24,9 +24,9 @@ MSG_HELP1="$(cat <<-'EOF' -m MESSAGE_TITLE the title message of the entry -t TYPE the type of entry to be added (default: |TYPE|) -s STATE the state of entry to be added (default: |STATE|) - -H pre-process issues file before generating HTML -l list the supported values for $TD_USE_BUILTIN_HOOKS -L lint the issues file + -H pre-process issues file before generating HTML -h, --help show this help message -V, --version print the version number @@ -492,11 +492,14 @@ done SHORT=false MESSAGE=FIXME -while getopts 'ct:s:m:lLHhV' flag; do +while getopts 'cm:t:s:lLHhV' flag; do case "$flag" in c) SHORT=true ;; + m) + MESSAGE="$OPTARG" + ;; t) TYPE="$OPTARG" NAME="$(name_for_type "$TYPE")" @@ -512,9 +515,6 @@ while getopts 'ct:s:m:lLHhV' flag; do exit 1 fi ;; - m) - MESSAGE="$OPTARG" - ;; l) list_hooks exit -- cgit v1.2.3