summaryrefslogtreecommitdiff
path: root/example/usage.zig (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Count occurrences of flags (was "Add .count type for flags") (#96)Gravatar Devin J. Pohly2023-04-021-1/+1
| | | | | | | | | | | | 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)
* Update help and usage examplesGravatar Jimmi Holst Christensen2022-03-301-3/+2
|
* Add parseParams and friendsGravatar Jimmi Holst Christensen2022-03-231-5/+6
|
* Allow for clap to parse argument values into typesGravatar Jimmi Holst Christensen2022-03-091-7/+7
| | | | | | | | | | | | | | This changes - `.flag`, `.option`, `.options` and `.positionals` are now just fields you access on the result of `parse` and `parseEx`. - `clap.ComptimeClap` has been removed. - `clap.StreamingClap` is now called `clap.streaming.Clap` - `parse` and `parseEx` now takes a `value_parsers` argument that provides the parsers to parse values. - Remove `helpEx`, `helpFull`, `usageEx` and `usageFull`. They now just expect `Id` to have methods for getting the description and value texts.
* Revert "Change clap into generating a struct"Gravatar Jimmi Holst Christensen2022-02-251-6/+6
| | | | This reverts commit cfaac64c404fb1c2e892880410aa3b7dd881ea58.
* Change clap into generating a structGravatar Jimmi Holst Christensen2022-02-251-6/+6
| | | | | | | | | This changes - `.flag`, `.option`, `.options` and `.positionals` are now just fields you access. - Move the current `clap.parse` and friends into `clap.untyped.parse` - This is in preperation for `clap.typed.parse`
* Improve help and usage examplesGravatar Jimmi Holst Christensen2021-11-291-8/+11
| | | | | | | | Instead of just calling these function, have the examples be small programs that demonstrates how you would actually use them together with argument parsing. fixes #57
* Update example of `usage` (#45)Gravatar J.R. "hiljusti" Hill2021-07-061-3/+3
|
* Update to latest zig in preperation for 0.8.0Gravatar Komari Spaghetti2021-05-261-1/+1
|
* Modernize codebaseGravatar Komari Spaghetti2021-05-081-4/+2
| | | | | | | | * Better naming for variables * Follow naming style of enums * Use `writer()` instead of `outStream()` * Change many initializers to be a one liner * Don't explicitly initialize fields to their default value
* Merge branch 'master' into zig-masterGravatar Jimmi Holst Christensen2020-04-181-4/+2
|
* Add clap.usageGravatar Jimmi Holst Christensen2020-03-051-0/+20