diff options
author | EuAndreh <eu@euandre.org> | 2022-01-20 13:21:36 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-01-20 13:22:29 -0300 |
commit | 0004080a79b500c85f8fda614e434c3e68ca7147 (patch) | |
tree | dcbbdf210a7123a5e4b0a347548fed08a3407e7f | |
parent | aux/workflow/TODOs.sh: Fix catenation of aux/workflow/preamble.md (diff) | |
download | td-0004080a79b500c85f8fda614e434c3e68ca7147.tar.gz td-0004080a79b500c85f8fda614e434c3e68ca7147.tar.xz |
src/td.in: Put options in help message and getopts arguments in the same order
-rwxr-xr-x | src/td.in | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 |