summaryrefslogtreecommitdiff
path: root/clap (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix: enable building on 32-bit platformsHEADmasterGravatar Jared Baur2025-12-041-1/+1
| | | | | Without this change, we get the following error when targeting 32bit platforms (e.g. arm-linux): "@fieldParentPtr increases pointer alignment".
* feat: Add `Diagnostic.reportToFile`Gravatar Jimmi Holst Christensen2025-07-221-1/+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-212-35/+39
|
* refactor: switch on signednessGravatar Valentin Charoux2024-11-151-33/+27
|
* fix: add uint parsing functionGravatar Valentin Charoux2024-11-151-17/+54
| | | | | | In order to get the more precise `ParseIntError.InvalidCharacter` error instead of `ParseIntError.Overflow` when a negative number is passed to a usize, uX typed argument, I use the `fmt.parseUnsigned` function.
* refactor: Always access using full namespaceGravatar Jimmi Holst Christensen2024-10-224-96/+76
| | | | This is my new preferred style of programming Zig :)
* adapt to latest zig changesGravatar owl2024-08-301-2/+2
|
* count codepoints instead of bytes, to determine widthGravatar owl2024-08-301-0/+102
| | | | | | | | | | | A complete solution would be to count grapheme clusters, but that would require adding a dependency on something like zg. Counting codepoints will ensure that typical non-ASCII text is supported, but you can still throw it off with more complex Unicode constructions, which might not be so useful in help text. Fixes #75
* feat: Allow for the assignment separator to be configuredGravatar Jimmi Holst Christensen2024-07-181-116/+159
|
* parsers: Add extra tests to `clap.parsers.int`Gravatar Jimmi Holst Christensen2023-09-101-0/+7
|
* parsers: Actually add some documentation to these functionsGravatar Jimmi Holst Christensen2023-09-101-2/+10
|
* Add clap.parsers.enumeration for parsing enumsGravatar Jimmi Holst Christensen2022-07-251-0/+37
| | | | closes #78
* Allow for clap to parse argument values into typesGravatar Jimmi Holst Christensen2022-03-093-250/+69
| | | | | | | | | | | | | | 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-253-400/+243
| | | | This reverts commit cfaac64c404fb1c2e892880410aa3b7dd881ea58.
* Change clap into generating a structGravatar Jimmi Holst Christensen2022-02-253-243/+400
| | | | | | | | | 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-312-316/+10
| | | | | | | | | 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`.
* Update usage of process.ArgIterator to be inline with newest zigGravatar Jimmi Holst Christensen2021-12-291-1/+1
| | | | | Also add windows CI, as this compiler error was only triggered on windows builds
* Merge branch 'zig-master'Gravatar Komari Spaghetti2021-12-212-9/+9
|\
| * zig master updates: allocator changes (#60)Gravatar Asherah Connor2021-12-062-6/+6
| |
| * Fix regression in last commitGravatar Komari Spaghetti2021-10-111-1/+0
| | | | | | | | | | The importing of builtin was already fixed, so the latest commit applied this fix again, which caused problems
| * zig master updatesGravatar Asherah Connor2021-10-112-2/+3
| |
| * Merge branch 'master' into zig-masterGravatar Komari Spaghetti2021-10-091-1/+1
| |\
| * | Discard unused variableGravatar Sirius9022021-07-251-1/+1
| | |
* | | Fix chaining typoGravatar Jimmi Holst Christensen2021-11-291-3/+3
| |/ |/| | | | | fixes #58
* | Fix uses of builtinGravatar Komari Spaghetti2021-10-091-1/+1
|/
* Forward diagnostics down to StreamingClapGravatar Komari Spaghetti2021-07-161-5/+54
| | | | fixes #46
* Fix all new compiler errors from zig masterGravatar Komari Spaghetti2021-06-242-4/+5
|
* Stay under 100 chars per line in all the codeGravatar Komari Spaghetti2021-06-243-8/+24
|
* Update to latest zig in preperation for 0.8.0Gravatar Komari Spaghetti2021-05-263-104/+118
|
* Modernize codebaseGravatar Komari Spaghetti2021-05-082-117/+87
| | | | | | | | * 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-282-30/+29
| | | | | | 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.
* Support all arguments after -- being positionalsGravatar Jimmi Holst Christensen2020-11-211-78/+106
|
* Fix spelling errorGravatar Jimmi Holst Christensen2020-11-211-1/+1
|
* Implement ShellIteratorGravatar Jimmi Holst Christensen2020-11-211-0/+262
| | | | fixes #30
* Deprecate ComptimeClap in favor of parseExv0.3.0Gravatar Jimmi Holst Christensen2020-11-101-4/+4
|
* Better parseParamGravatar Jimmi Holst Christensen2020-11-102-12/+2
|
* Improve Diagnostic error message reportingGravatar Jimmi Holst Christensen2020-11-033-16/+80
|
* Replace `var` with `anytype`Gravatar Jimmi Holst Christensen2020-11-021-1/+1
|
* Report error context in Diagnostic (#26)Gravatar Komari Spaghetti2020-11-022-44/+54
|
* use null sentinel in OsIterator (#27)Gravatar Matthew Knight2020-11-011-2/+2
|
* reverse the order of theseGravatar Asherah Connor2020-08-281-9/+9
|
* fix upGravatar Asherah Connor2020-08-281-5/+8
|
* separate options into single and multipleGravatar Asherah Connor2020-08-281-25/+35
| | | | This avoids allocations if you never use multiple arguments.
* parse and validate multiple optionGravatar Asherah Connor2020-08-282-18/+39
|
* parse multiple optionsGravatar Asherah Connor2020-08-281-9/+22
|
* update for latest zigGravatar dbandstra2020-03-011-2/+2
|
* update for latest zig (typeOf was renamed)Gravatar dbandstra2019-12-101-1/+1
|
* update for latest zigGravatar dbandstra2019-12-013-18/+18
|
* Breaking: OsIterator will now get the exe on initGravatar Jimmi Holst Christensen2019-11-091-2/+10
|
* fmt, mv src/ clap/ and run fmt on buildGravatar Jimmi Holst Christensen2019-10-063-0/+562