If two commands are registered with the same name, the last one registered replaces the original. But since we can't predict if users register default or custom commands last, it could lead to unintended overwriting of custom commands by default ones.
I think it's an accurate assumption that most people are registering built-in stuff first, but you know what they say about assumptions! Imo it risks introducing breaking changes, violating both semver and Cmdr's reputation for stability.
If there's a conflict between a built-in command or type and a developer-registered one, the developer one should take priority irrespective of which was registered later. For a conflict between two developer-registered commands, the one registered later should take priority (I believe this is the current behaviour.)
A warning should be emitted in either case so that way there's no surprises for the developer.
Originally posted by @wilyt1 in https://github.com/evaera/Cmdr/issues/327#issuecomment-2221263008
I think it's an accurate assumption that most people are registering built-in stuff first, but you know what they say about assumptions! Imo it risks introducing breaking changes, violating both semver and Cmdr's reputation for stability.
If there's a conflict between a built-in command or type and a developer-registered one, the developer one should take priority irrespective of which was registered later. For a conflict between two developer-registered commands, the one registered later should take priority (I believe this is the current behaviour.)
A warning should be emitted in either case so that way there's no surprises for the developer.