getopts
getopts copied to clipboard
Check option names conflict on debug build
Currently getopts doesn't complain that multiple options have the same short/long option names. However these cases are always mistakes because when one option uses some option name, other options which use the same name cannot be specified at all.
This mistake tends to happen when the number of options/flags grows bigger.
This PR checks the conflict on debug build and notifies the mistake to the user.