summaryrefslogtreecommitdiff
path: root/example/simple-ex.zig (follow)
Commit message (Collapse)AuthorAgeFilesLines
* feat: Add `Diagnostic.reportToFile`Gravatar Jimmi Holst Christensen2025-07-221-4/+1
| | | | | | 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.
* Update to Zig 0.15.0-dev.1147Gravatar Ivan Stepanov2025-07-211-1/+5
|
* Patch up README and fix comments in example files. (#143)Gravatar JustAnotherCodemonkey2024-11-251-1/+1
| | | 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).
* feat: Support multiple positionals of different typesGravatar Jimmi Holst Christensen2024-10-241-1/+1
|
* refactor: Always access using full namespaceGravatar Jimmi Holst Christensen2024-10-221-13/+9
| | | | This is my new preferred style of programming Zig :)
* feat: Allow for the assignment separator to be configuredGravatar Jimmi Holst Christensen2024-07-181-0/+3
|
* Remove the default allocator from `ParseOptions`Gravatar Jimmi Holst Christensen2023-12-131-0/+4
| | | | fixes #111
* 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)
* Add clap.parsers.enumeration for parsing enumsGravatar Jimmi Holst Christensen2022-07-251-0/+5
| | | | closes #78
* Add parseParams and friendsGravatar Jimmi Holst Christensen2022-03-231-7/+8
|
* Allow for clap to parse argument values into typesGravatar Jimmi Holst Christensen2022-03-091-22/+17
| | | | | | | | | | | | | | 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-10/+10
| | | | This reverts commit cfaac64c404fb1c2e892880410aa3b7dd881ea58.
* Change clap into generating a structGravatar Jimmi Holst Christensen2022-02-251-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`
* Refactor the ArgIterator interfaceGravatar Jimmi Holst Christensen2022-01-311-3/+5
| | | | | | | | | 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`.
* Use debug.print instead of deprecated debug.warn in examplesGravatar Komari Spaghetti2021-07-171-4/+4
| | | | fixes comment on #11
* Update to latest zig in preperation for 0.8.0Gravatar Komari Spaghetti2021-05-261-7/+3
|
* Merge branch 'master' into zig-masterGravatar Komari Spaghetti2021-05-261-6/+13
|\
| * Modernize codebaseGravatar Komari Spaghetti2021-05-081-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
| * Refactor Diagnostic (and others) into a ParseOption structGravatar Komari Spaghetti2021-04-281-6/+8
| | | | | | | | | | | | 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.
* | zig master updatesGravatar Asherah Connor2021-01-101-1/+1
|/
* Deprecate ComptimeClap in favor of parseExv0.3.0Gravatar Jimmi Holst Christensen2020-11-101-0/+43