mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
updated README [ci skip]
This commit is contained in:
11
README.md
11
README.md
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
__argparse__ is a feature-rich command line parser for Lua inspired by argparse for Python.
|
__argparse__ is a feature-rich command line parser for Lua inspired by argparse for Python.
|
||||||
|
|
||||||
Not everything stated here is implemented.
|
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
* Declarative and classic interfaces.
|
* Declarative and classic interfaces.
|
||||||
@@ -33,6 +31,7 @@ Features:
|
|||||||
count = "*"
|
count = "*"
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
* Parses:
|
* Parses:
|
||||||
* Short options(e.g. `-q`);
|
* Short options(e.g. `-q`);
|
||||||
* Combined short options(e.g. `-zx`);
|
* Combined short options(e.g. `-zx`);
|
||||||
@@ -43,8 +42,6 @@ Features:
|
|||||||
* Supports named arguments consuming several arguments.
|
* Supports named arguments consuming several arguments.
|
||||||
* Supports options and flags which can be invoked several times, consuming several arguments.
|
* Supports options and flags which can be invoked several times, consuming several arguments.
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
parser:option "-p" "--pair"
|
parser:option "-p" "--pair"
|
||||||
:count "*"
|
:count "*"
|
||||||
@@ -64,11 +61,9 @@ Features:
|
|||||||
```
|
```
|
||||||
|
|
||||||
* Supports default values and automatic conversions for arguments.
|
* Supports default values and automatic conversions for arguments.
|
||||||
* Automatically generates error, usage and help(__NYI__) messages.
|
* Automatically generates error, usage and help messages.
|
||||||
* Supports commands(e.g. in [git](http://git-scm.com/) CLI `add`, `commit`, `push`, etc. are commands). Each command has its own set of options and arguments.
|
* Supports commands(e.g. in [git](http://git-scm.com/) CLI `add`, `commit`, `push`, etc. are commands). Each command has its own set of options and arguments.
|
||||||
* Automatically generates tips on typos.
|
* Automatically generates hints on typos.
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
parser:option "-f" "--from"
|
parser:option "-f" "--from"
|
||||||
|
Reference in New Issue
Block a user