summaryrefslogtreecommitdiff
path: root/example/simple.zig (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-08-16using new arraylist apiGravatar Fabrice1-1/+1
2025-07-22feat: Add `Diagnostic.reportToFile`Gravatar Jimmi Holst Christensen1-4/+2
The code for reporting errors became quite verbose after writegate. Reporting to stderr is very common, so this wrapper provides a default, buffered way to report to a file.
2025-07-21Update to Zig 0.15.0-dev.1147Gravatar Ivan Stepanov1-2/+4
2024-11-25Patch up README and fix comments in example files. (#143)Gravatar JustAnotherCodemonkey1-2/+2
The readme was also reflowed to 100 cols. I probably should have put that in a separate commit but oh well. The comments were not subjected to reflowing (yet).
2024-10-24feat: Support multiple positionals of different typesGravatar Jimmi Holst Christensen1-1/+1
2024-10-22refactor: Always access using full namespaceGravatar Jimmi Holst Christensen1-11/+8
This is my new preferred style of programming Zig :)
2023-12-13Remove the default allocator from `ParseOptions`Gravatar Jimmi Holst Christensen1-0/+4
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)
2023-01-12Fix misspelled thingsGravatar Jimmi Holst Christensen1-1/+1
2022-03-23Add parseParams and friendsGravatar Jimmi Holst Christensen1-7/+8
2022-03-09Allow for clap to parse argument values into typesGravatar Jimmi Holst Christensen1-11/+13
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-10/+10
This reverts commit cfaac64c404fb1c2e892880410aa3b7dd881ea58.
2022-02-25Change clap into generating a structGravatar Jimmi Holst Christensen1-10/+10
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-07-17Use debug.print instead of deprecated debug.warn in examplesGravatar Komari Spaghetti1-4/+4
fixes comment on #11
2021-05-26Update to latest zig in preperation for 0.8.0Gravatar Komari Spaghetti1-3/+3
2021-05-08Modernize codebaseGravatar Komari Spaghetti1-1/+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-04-28Refactor Diagnostic (and others) into a ParseOption structGravatar Komari Spaghetti1-6/+5
This allows for default arguments, which we can also extend without breaking peoples code in the future. This is a breaking change right now though.
2021-01-10zig master updatesGravatar Asherah Connor1-1/+1
2020-11-10Better parseParamGravatar Jimmi Holst Christensen1-3/+1
2020-11-10Better parseParamGravatar Jimmi Holst Christensen1-3/+1
2020-11-02Report error context in Diagnostic (#26)Gravatar Komari Spaghetti1-1/+10
2020-11-02Report error context in Diagnostic (#26)Gravatar Komari Spaghetti1-1/+10
2020-09-06adjust examples, README templateGravatar Asherah Connor1-3/+6
2020-08-28adjust examples, README templateGravatar Asherah Connor1-3/+6
2020-04-18Run zig fmt on buildv0.2.0Gravatar Jimmi Holst Christensen1-2/+2
2020-04-11update examples to latest zigGravatar joachimschmidt5571-1/+1
2019-12-09update for latest zig (varargs is no more)Gravatar dbandstra1-3/+3
2019-12-01update for latest zigGravatar dbandstra1-1/+1
2019-11-27Add clap.parse as the simplest way of using the libGravatar Jimmi Holst Christensen1-9/+1
2019-11-09Breaking: OsIterator will now get the exe on initGravatar Jimmi Holst Christensen1-5/+2
2019-08-17make help message look more like other toolsGravatar Jimmi Holst Christensen1-2/+2
2019-08-17add missing wordGravatar Jimmi Holst Christensen1-1/+1
2019-08-17adds parseParamGravatar Jimmi Holst Christensen1-13/+6
a less verbose way of getting a Param(Help).
2019-08-06build with latest version of zigGravatar Jimmi Holst Christensen1-7/+1
2019-06-21Embed examples in README during buildGravatar Jimmi HC1-5/+2
fixes #11
2019-06-12updated to newest version of zigGravatar Jimmi HC1-10/+14
2019-01-17Refactored the arg iterators to new be static interface implementationsGravatar Jimmi Holst Christensen1-4/+3
* This makes arg iterators easier to understand and implement * It should also be faster than using the fieldToParent builtin
2018-11-15Changed Names.prefix to Names.bothGravatar Jimmi HC1-2/+2
2018-11-15Added help functionGravatar Jimmi Holst Christensen1-16/+19
2018-11-14Added pub flag/option/positional init funcs to ParamGravatar Jimmi Holst Christensen1-3/+3
2018-11-14Restructured and make StreamingClap simplerGravatar Jimmi Holst Christensen1-0/+47
* Also added a ComptimeClap