]> git.corax.cc Git - toolbox/commit
include/opt: Emit an error if a required parameter is missing
authorMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 12:47:38 +0000 (21:47 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 12:47:38 +0000 (21:47 +0900)
commit6011f6c11aa4f09933219d22bb9d28a3a9b93096
treea0f22bb9afb84ff45b19768cc20a85d60a8bd357
parent8faa458a58974b8fb21d16ec96675459bd84fb23
include/opt: Emit an error if a required parameter is missing

When an option expecting a parameter is not passed one, `opt_parse()`
does not fail because of an incorrect comparison.

This commit fixes the comparison so that `opt_parse()` fails and
prints an error message when a required parameter is missing.
include/opt.sh