summaryrefslogtreecommitdiff
path: root/example (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-08-16using new arraylist apiGravatar Fabrice5-5/+5
2025-07-22feat: Add `clap.usageToFile`Gravatar Jimmi Holst Christensen1-9/+4
The code for printing usage became quite verbose after writegate. Writing usage to a file like stdout and stderr is very common, so this wrapper provides a default, buffered way to report to a file.
2025-07-22feat: Add `clap.helpToFile`Gravatar Jimmi Holst Christensen1-6/+2
The code for printing help became quite verbose after writegate. Writing help to a file like stdout and stderr is very common, so this wrapper provides a default, buffered way to report to a file.
2025-07-22feat: Add `Diagnostic.reportToFile`Gravatar Jimmi Holst Christensen4-20/+8
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 Stepanov6-13/+35
2025-03-27doc: Don't autogenerate the READMEGravatar Jimmi Holst Christensen1-129/+0
2025-02-24Update README.md.templateGravatar Komari Spaghetti1-3/+3
2024-11-25Patch up README and fix comments in example files. (#143)Gravatar JustAnotherCodemonkey5-28/+26
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-24fix: Subcommand example comments needs a scroll to be readGravatar Jimmi Holst Christensen1-6/+6
2024-10-24docs: Add subcommand exampleGravatar Jimmi Holst Christensen2-1/+106
2024-10-24feat: Support multiple positionals of different typesGravatar Jimmi Holst Christensen3-5/+5
2024-10-22refactor: Always access using full namespaceGravatar Jimmi Holst Christensen5-44/+33
This is my new preferred style of programming Zig :)
2024-09-21Move updated README to templateGravatar Jimmi Holst Christensen1-7/+12
2024-07-18feat: Allow for the assignment separator to be configuredGravatar Jimmi Holst Christensen1-0/+3
2024-06-09Add installation instructions to READMEGravatar 12ball1-0/+15
2024-01-09Update to latest version of zigGravatar Jimmi Holst Christensen1-0/+6
2023-12-13Remove the default allocator from `ParseOptions`Gravatar Jimmi Holst Christensen4-2/+20
fixes #111
2023-04-02Count occurrences of flags (was "Add .count type for flags") (#96)Gravatar Devin J. Pohly5-4/+5
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 Christensen2-2/+2
2022-07-28Update README templateGravatar Jimmi Holst Christensen1-0/+5
2022-07-25Add clap.parsers.enumeration for parsing enumsGravatar Jimmi Holst Christensen1-0/+5
closes #78
2022-03-30Update help and usage examplesGravatar Jimmi Holst Christensen2-6/+6
2022-03-30New `help` api that provides options as to how paramters are printed.Gravatar Jimmi Holst Christensen2-4/+8
fixes \#28
2022-03-23Fix usage output in READMEGravatar Jimmi Holst Christensen1-1/+1
2022-03-23Add parseParams and friendsGravatar Jimmi Holst Christensen5-25/+29
2022-03-09Allow for clap to parse argument values into typesGravatar Jimmi Holst Christensen7-92/+59
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 Christensen6-34/+34
This reverts commit cfaac64c404fb1c2e892880410aa3b7dd881ea58.
2022-02-25Change clap into generating a structGravatar Jimmi Holst Christensen6-34/+34
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`
2022-02-22Fix minor typos in README.mdGravatar Jimmi Holst Christensen1-1/+4
2022-01-31Refactor the ArgIterator interfaceGravatar Jimmi Holst Christensen2-7/+11
They now follow the interface provided by the standard library. This now means that we no longer needs `args.OsIterator` as that the one from `std` can now be used directly. Also remove `args.ShellIterator` as a simular iterator exists in `std` called `ArgIteratorGeneral`.
2021-12-21Master branch now follows zig masterGravatar Komari Spaghetti1-4/+0
It makes more sense to have the master branch follow zig master, and then create versioned branches to backport bug fixes to if nessesary
2021-11-29Improve help and usage examplesGravatar Jimmi Holst Christensen3-15/+23
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-17Use debug.print instead of deprecated debug.warn in examplesGravatar Komari Spaghetti3-11/+11
fixes comment on #11
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 Spaghetti6-24/+16
2021-05-08Modernize codebaseGravatar Komari Spaghetti6-23/+18
* 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 Spaghetti3-20/+20
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 Connor5-5/+5
2020-11-10Deprecate ComptimeClap in favor of parseExv0.3.0Gravatar Jimmi Holst Christensen2-12/+3
2020-11-10Better parseParamGravatar Jimmi Holst Christensen2-6/+2
2020-11-10Better parseParamGravatar Jimmi Holst Christensen2-6/+2
2020-11-02Report error context in Diagnostic (#26)Gravatar Komari Spaghetti4-6/+32
2020-11-02Report error context in Diagnostic (#26)Gravatar Komari Spaghetti4-6/+32
2020-09-06adjust examples, README templateGravatar Asherah Connor4-9/+17
2020-08-28adjust examples, README templateGravatar Asherah Connor4-9/+17
2020-04-18Run zig fmt on buildv0.2.0Gravatar Jimmi Holst Christensen3-6/+6
2020-04-11update examples to latest zigGravatar joachimschmidt5574-5/+4
2020-03-05Better readme for usageGravatar Jimmi Holst Christensen1-11/+2
2020-03-05Add clap.usageGravatar Jimmi Holst Christensen2-0/+43
2019-12-09update for latest zig (varargs is no more)Gravatar dbandstra3-9/+9