Simply copyright and author header components when empty

This commit is contained in:
Zane Duffield
2026-01-14 12:27:32 +11:00
parent 66563ad58a
commit 94f11c6f01

View File

@@ -164,7 +164,10 @@ function cmdarg_usage
# cmdarg_usage
#
# Prints a very helpful usage message about the current program.
echo "$(basename "$0") ${CMDARG_INFO['copyright']} : ${CMDARG_INFO['author']}"
local copyright=${CMDARG_INFO['copyright']:+ ${CMDARG_INFO['copyright']}}
local author=${CMDARG_INFO['author']:+ : ${CMDARG_INFO['author']}}
echo "$(basename "$0")$copyright$author"
echo
echo "${CMDARG_INFO['header']}"
echo