]> git.corax.cc Git - toolbox/commit
include/opt: Use column command to align help text
authorMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 11:48:17 +0000 (20:48 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 11:48:17 +0000 (20:48 +0900)
commit78bf3673f66f72edfdc87ce20c4bfd89e3f4450e
tree823168f2ed589cd42cdee5ce48d1cf2908c5a280
parented7eace72b34c361eb294a3aad3e1777d52992d3
include/opt: Use column command to align help text

When printing the help text, the opt module aligns columns manually
by tracking the longest option name and inserting the required amount
of spaces into the output. This is needlessly complicated considering
there are simpler ways to align output.

This commit modifies the opt module to use the column command to
align the table of options in the help text.
include/opt.sh