Tyrrrz / CliFx

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

Show valid values of an enum option in help #53

Closed domn1995 closed 4 years ago

domn1995 commented 4 years ago

Closes #18.

Notable Changes

Additional Comment

I'd also like to bring attention to the following null check: https://github.com/domn1995/CliFx/blob/7ff83c42066865cb4cf0354ed93694114128810a/CliFx/Domain/HelpTextWriter.cs#L264-L266

This was required even though nullable reference types reported that Property was non-nullable. That is due to the damn it operators here:

https://github.com/Tyrrrz/CliFx/blob/cbb72b16ae2ba095abcd593cbddf6e8961ba10b8/CliFx/Domain/CommandOptionSchema.cs#L102-L106

Maybe we can open up an issue to remove those null!s and refactor accordingly just as general quality control.

Tyrrrz commented 4 years ago

Maybe we can open up an issue to remove those null!s and refactor accordingly just as general quality control.

I completely agree. Built-in options are a bit of hack right now because they're separate from the actual command. I'm still not sure how to handle it better.

domn1995 commented 4 years ago

@Tyrrrz, ready for round two :)

domn1995 commented 4 years ago

@Tyrrrz, ready for round three 🤞

Tyrrrz commented 4 years ago

Thanks! 🎉