Closed VADemon closed 4 years ago
I was going by the documentation and wanted to restrict a certain argument to only a few choices as described.
However it appears that there's no "choices" whatsoever in argparse.lua? CTRL+F for choices choice - 0 matches.
argparse.lua
choices
choice
This leaves me no choice but to forget about this feature.
argparse = require("lib.argparse") local parser = argparse("name", "descr", "footer") parser:argument("-s --site") :choices{"auto","two","three"} :description("Type of link")
L4: attempt to call a nil value (method 'choices')
What happened there with the doc/lib?
argparse is now maintained by luarocks: https://github.com/luarocks/argparse
Thanks, since I can't change the title, I think it would be nice if you created an issue to notify people :)
I was going by the documentation and wanted to restrict a certain argument to only a few choices as described.
However it appears that there's no "choices" whatsoever in
argparse.lua
? CTRL+F forchoices
choice
- 0 matches.This leaves me no choice but to forget about this feature.
L4: attempt to call a nil value (method 'choices')
What happened there with the doc/lib?