Tyrrrz / CliFx

Class-first framework for building command-line interfaces
MIT License
1.48k stars 60 forks source link

Show error when user provides an option/parameter that the command doesn't support #38

Closed Tyrrrz closed 4 years ago

Tyrrrz commented 4 years ago

When the user supplies an unknown option/parameter, they should receive an error. This aligns with an optimal user experience, because the application shouldn't silently discard arguments that the user assumed would somehow change the behavior of the program.

Need to add a throw new CliFxException(...) statement somewhere in CommandSchema.InjectParameters and CommandSchema.InjectOptions.

Add corresponding tests.