diff options
| author | 2023-04-02 06:10:40 -0500 | |
|---|---|---|
| committer | 2023-04-02 13:10:40 +0200 | |
| commit | ab69ef2db44b6c4b7f00283d52d38fbe71d16c42 (patch) | |
| tree | 10416c0cdda32ba98d54954940c440beac6ccf08 /example/README.md.template | |
| parent | Update build script to actually run the tests (diff) | |
| download | zig-clap-ab69ef2db44b6c4b7f00283d52d38fbe71d16c42.tar.gz zig-clap-ab69ef2db44b6c4b7f00283d52d38fbe71d16c42.tar.xz zig-clap-ab69ef2db44b6c4b7f00283d52d38fbe71d16c42.zip | |
Count occurrences of flags (was "Add .count type for flags") (#96)
Breaking change: parseEx now counts the number of occurrences of flag
parameters (those with takes_value == .none) and returns the count as a
u8. Users of the library will need to change
if (arg_result.my_flag)
to
if (arg_result.my_flag != 0)
Diffstat (limited to '')
| -rw-r--r-- | example/README.md.template | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/example/README.md.template b/example/README.md.template index 696c598..34bff56 100644 --- a/example/README.md.template +++ b/example/README.md.template | |||
| @@ -14,6 +14,7 @@ in the release notes. | |||
| 14 | 14 | ||
| 15 | * Short arguments `-a` | 15 | * Short arguments `-a` |
| 16 | * Chaining `-abc` where `a` and `b` does not take values. | 16 | * Chaining `-abc` where `a` and `b` does not take values. |
| 17 | * Multiple specifications are tallied (e.g. `-v -v`). | ||
| 17 | * Long arguments `--long` | 18 | * Long arguments `--long` |
| 18 | * Supports both passing values using spacing and `=` (`-a 100`, `-a=100`) | 19 | * Supports both passing values using spacing and `=` (`-a 100`, `-a=100`) |
| 19 | * Short args also support passing values with no spacing or `=` (`-a100`) | 20 | * Short args also support passing values with no spacing or `=` (`-a100`) |