getopts
getopts copied to clipboard
Check option names conflict on debug build
Currently getopts doesn't complain when multiple options have the same short/long option names. But these case 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 grow bigger.
This PR checks the conflict on debug build and notifies the mistake to the user.