It would appear to be possible to register the same short/long options multiple times for a command. It would be better if this was caught and threw an error as early as possible. I thought it would be caught in Cmd but it was not, so then I thought maybe it was caught in cmd.Spec but it appears not to be caught there either.
In a large CLI particularly if modular its hard to see which arguments have been used.
It would appear to be possible to register the same short/long options multiple times for a command. It would be better if this was caught and threw an error as early as possible. I thought it would be caught in
Cmd
but it was not, so then I thought maybe it was caught incmd.Spec
but it appears not to be caught there either.In a large CLI particularly if modular its hard to see which arguments have been used.