Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option with specific choices list #10

Open
Veratil opened this issue Dec 1, 2016 · 2 comments
Open

option with specific choices list #10

Veratil opened this issue Dec 1, 2016 · 2 comments

Comments

@Veratil
Copy link

Veratil commented Dec 1, 2016

I don't see any mention of this in the docs, but it would be nice to mimic the choices parameter as seen in the python argparse module (https://docs.python.org/dev/library/argparse.html#choices).

@mpeterv
Copy link
Owner

mpeterv commented Jun 8, 2017

This is a good idea. Python's argparse accepts any value that has in operator as choices parameter, but in Lua it makes sense to support only arrays, at first at least. I'll try to implement this when I have time, in the meantime pull requests are welcome.

@nwf
Copy link

nwf commented Feb 6, 2022

FWIW, this is implemented in the luarocks branch of this repository, at https://github.com/luarocks/argparse, in luarocks@dcd5162 in particular.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants