clikit icon indicating copy to clipboard operation
clikit copied to clipboard

Feature request: Allow a `choices` equivalent for Option

Open jeffb4 opened this issue 5 years ago • 0 comments

argparse has the concept of setting a choices container for an argument. This is useful for automatically limiting user input and printing allowed choices in generated help, see https://docs.python.org/3/library/argparse.html#choices

I don't know if https://github.com/sdispater/clikit/blob/master/src/clikit/api/args/format/option.py would be the correct place to add such an configuration knob, or what that would look like in the class proper and in the help generation code

jeffb4 avatar Sep 27 '19 23:09 jeffb4