]> git.corax.cc Git - toolbox/commit
include/opt: Print correct script name on older bash versions
authorMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 11:18:02 +0000 (20:18 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 11:47:14 +0000 (20:47 +0900)
commited7eace72b34c361eb294a3aad3e1777d52992d3
tree4cfb7e3320ea817e9cd7c5000150392f03a66557
parent7f3910390b1b7720fe54307bec0656ec9e21e21c
include/opt: Print correct script name on older bash versions

The opt module references $BASH_ARGV0 to get the name of the running
script. However, the variable does not exist on older bash versions,
causing a gap in the help text.

This commit modifies the opt module to access the script name from
$0, which should be available on all bash versions.
include/opt.sh