Changes for version 1.2.0 - 2026-11-16
- --no- with an option which takes an optional argument (?) unsets the variable, as when the option is not specified. It gave the empty string, the same as the option without a value. A value assigned to the variable before the options are parsed works as a default, which --no- removes. A callback of such an option has to use ${var-} under set -u
Documentation
Getting started with getoptlong.sh
Option parsing that does what you mean, for Bash
Modules
Bash option parsing that does what you mean