summaryrefslogtreecommitdiff
path: root/example (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-12-13Remove the default allocator from `ParseOptions`no-default-allocatorGravatar 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
2019-12-01update for latest zigGravatar dbandstra5-6/+6
2019-11-27Add clap.parse as the simplest way of using the libGravatar Jimmi Holst Christensen4-39/+71
2019-11-09Breaking: OsIterator will now get the exe on initGravatar Jimmi Holst Christensen2-10/+4
2019-08-17correct comptime-clap-error.zig exampleGravatar Jimmi Holst Christensen2-7/+5
2019-08-17more features in README.mdGravatar Jimmi Holst Christensen1-0/+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 Christensen3-25/+12
a less verbose way of getting a Param(Help).
2019-08-06build with latest version of zigGravatar Jimmi Holst Christensen2-10/+2
2019-06-21Embed examples in README during buildGravatar Jimmi HC4-5/+125
fixes #11
2019-06-12updated to newest version of zigGravatar Jimmi HC2-15/+32
2019-01-17Refactored the arg iterators to new be static interface implementationsGravatar Jimmi Holst Christensen2-8/+6
* 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 HC2-4/+4
2018-11-15Added help functionGravatar Jimmi Holst Christensen2-26/+19
2018-11-14Added pub flag/option/positional init funcs to ParamGravatar Jimmi Holst Christensen2-6/+6
2018-11-14Restructured and make StreamingClap simplerGravatar Jimmi Holst Christensen2-0/+101
* Also added a ComptimeClap