summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jimmi Holst Christensen2018-09-15 13:14:34 +0200
committerGravatar Jimmi Holst Christensen2018-09-15 13:14:34 +0200
commit97ace8a3eb2381a4c48250110d0b73e067b0ff97 (patch)
treef400add3a3dcbd59003cae0676679b574e6992a2
parentUpdated to newest @This builtin (diff)
parentUpdate .travis.yml (diff)
downloadzig-clap-97ace8a3eb2381a4c48250110d0b73e067b0ff97.tar.gz
zig-clap-97ace8a3eb2381a4c48250110d0b73e067b0ff97.tar.xz
zig-clap-97ace8a3eb2381a4c48250110d0b73e067b0ff97.zip
Merge branch 'master' of github.com:Hejsil/zig-clap
Diffstat (limited to '')
-rw-r--r--.travis.yml1
-rw-r--r--README.md12
2 files changed, 7 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index 740ce32..2253826 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,3 +9,4 @@ git:
9script: 9script:
10 - zig-linux-*/zig version 10 - zig-linux-*/zig version
11 - zig-linux-*/zig test test.zig 11 - zig-linux-*/zig test test.zig
12
diff --git a/README.md b/README.md
index f541867..f4c3766 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,17 @@
1# zig-clap 1# zig-clap
2 2
3An easy to use command line argument parser library for Zig. 3A simple and easy to use command line argument parser library for Zig.
4It's ment as a thin layer of abstraction over parsing arguments which allows
5for further abstraction on top, such as filling in a `HashMap`.
4 6
5## Features 7## Features
6 8
7See [example](example.zig). 9See [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