Comments (2)
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.
from argparse.
FWIW, this is implemented in the luarocks
branch of this repository, at https://github.com/luarocks/argparse, in luarocks@dcd5162 in particular.
from argparse.
Related Issues (20)
- Add ability to add arguments to a mutex HOT 2
- Command hierarchy should be reflected in the result table
- Assuming print is patched to handle tables nicely HOT 1
- Multi-argument options and conversion HOT 2
- Prettier help strings. HOT 5
- Support 'no' prefix for negatable flags (e.g. --verbose or --noverbose) HOT 1
- Support for trailing '--' to indicate remaining options to be captured/forwarded verbatim HOT 4
- Support parsing arguments partially HOT 2
- Generate completions for shells HOT 2
- Replace non-portable os.exit() invocations HOT 1
- Very trivial issue - argparse.version HOT 2
- Option to not exit on help or error HOT 2
- How to stop handling options after an argument? HOT 3
- choices property is not recognized HOT 3
- Argument choices? HOT 2
- mutually inclusive functionality
- Allow offset for argument parsing HOT 3
- Allow option to handle exit programmatically HOT 2
- Print default values even if non string HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argparse.