summaryrefslogtreecommitdiff
path: root/example/simple-ex.zig (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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