summaryrefslogtreecommitdiff
path: root/example/usage.zig (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-12-13Remove the default allocator from `ParseOptions`Gravatar Jimmi Holst Christensen1-1/+6
fixes #111
2023-04-02Count occurrences of flags (was "Add .count type for flags") (#96)Gravatar Devin J. Pohly1-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)
2022-03-30Update help and usage examplesGravatar Jimmi Holst Christensen1-3/+2
2022-03-23Add parseParams and friendsGravatar Jimmi Holst Christensen1-5/+6
2022-03-09Allow for clap to parse argument values into typesGravatar Jimmi Holst Christensen1-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.
2022-02-25Revert "Change clap into generating a struct"Gravatar Jimmi Holst Christensen1-6/+6
This reverts commit cfaac64c404fb1c2e892880410aa3b7dd881ea58.
2022-02-25Change clap into generating a structGravatar Jimmi Holst Christensen1-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`
2021-11-29Improve help and usage examplesGravatar Jimmi Holst Christensen1-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
2021-07-06Update example of `usage` (#45)Gravatar J.R. "hiljusti" Hill1-3/+3
2021-05-26Update to latest zig in preperation for 0.8.0Gravatar Komari Spaghetti1-1/+1
2021-05-08Modernize codebaseGravatar Komari Spaghetti1-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
2021-01-10zig master updatesGravatar Asherah Connor1-1/+1
2020-03-05Add clap.usageGravatar Jimmi Holst Christensen1-0/+20