]> git.corax.cc Git - toolbox/commit
include/opt: Show default values in help text
authorMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 17:46:52 +0000 (02:46 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 17:46:52 +0000 (02:46 +0900)
commit37f4528eea77e3481c36b9c194f1f4c69879b694
tree97eed294386b6f9f878c41eddda969a856584a8a
parent613b5b606bf8b35b064f66bd40f0ebe7079621ac
include/opt: Show default values in help text

The opt module does not show the default values of options in the
help text, leaving the user guessing what the values of options are
if they are not specified on the command line.

This commit modifies `opt_print_help()` so that it displays the
default values of options that have a value and a default set.
include/opt.sh