diff options
| author | 2018-09-06 17:43:43 +0200 | |
|---|---|---|
| committer | 2018-09-06 17:43:43 +0200 | |
| commit | 61628667817fddded51afa6feeaaacc5852374e1 (patch) | |
| tree | af3fb95dd9364e09f197da662d3cc08695b39790 /README.md | |
| parent | Commented the example (diff) | |
| download | zig-clap-61628667817fddded51afa6feeaaacc5852374e1.tar.gz zig-clap-61628667817fddded51afa6feeaaacc5852374e1.tar.xz zig-clap-61628667817fddded51afa6feeaaacc5852374e1.zip | |
Update README.md
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 12 |
1 files changed, 6 insertions, 6 deletions
| @@ -1,17 +1,17 @@ | |||
| 1 | # zig-clap | 1 | # zig-clap |
| 2 | 2 | ||
| 3 | An easy to use command line argument parser library for Zig. | 3 | A simple and easy to use command line argument parser library for Zig. |
| 4 | It's ment as a thin layer of abstraction over parsing arguments. Users | ||
| 5 | can then build on top to parse arguments into their own data structures. | ||
| 4 | 6 | ||
| 5 | ## Features | 7 | ## Features |
| 6 | 8 | ||
| 7 | See [example](example.zig). | 9 | See [example](https://github.com/Hejsil/zig-clap/blob/38a51948069f405864ab327826b5975a6d0c93a8/test.zig#L200-L247). |
| 8 | |||
| 9 | * Assosiate arguements with fields of a struct. | ||
| 10 | * When an arguement is found by the clap, the field is set to a parsed version of the value. | ||
| 11 | * `zig-clap` provides some default parses, but you can make your own as well. | ||
| 12 | * Short arguments `-a` | 10 | * Short arguments `-a` |
| 13 | * Chaining `-abc` where `a` and `b` does not take values. | 11 | * Chaining `-abc` where `a` and `b` does not take values. |
| 14 | * Long arguments `--long` | 12 | * Long arguments `--long` |
| 13 | * Bare arguments `bare` | ||
| 15 | * Supports both passing values using spacing and `=` (`-a 100`, `-a=100`) | 14 | * Supports both passing values using spacing and `=` (`-a 100`, `-a=100`) |
| 16 | * Short args also support passing values with no spacing or `=` (`-a100`) | 15 | * Short args also support passing values with no spacing or `=` (`-a100`) |
| 17 | * This all works with chaining (`-ba 100`, `-ba=100`, `-ba100`) | 16 | * This all works with chaining (`-ba 100`, `-ba=100`, `-ba100`) |
| 17 | |||