summaryrefslogtreecommitdiff
path: root/clap (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-07-22feat: Add `Diagnostic.reportToFile`Gravatar Jimmi Holst Christensen1-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.
2025-07-21Update to Zig 0.15.0-dev.1147Gravatar Ivan Stepanov2-35/+39
2024-11-15refactor: switch on signednessGravatar Valentin Charoux1-33/+27
2024-11-15fix: add uint parsing functionGravatar Valentin Charoux1-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.
2024-10-22refactor: Always access using full namespaceGravatar Jimmi Holst Christensen4-96/+76
This is my new preferred style of programming Zig :)
2024-08-30adapt to latest zig changesGravatar owl1-2/+2
2024-08-30count codepoints instead of bytes, to determine widthGravatar owl1-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
2024-07-18feat: Allow for the assignment separator to be configuredGravatar Jimmi Holst Christensen1-116/+159
2023-09-10parsers: Add extra tests to `clap.parsers.int`Gravatar Jimmi Holst Christensen1-0/+7
2023-09-10parsers: Actually add some documentation to these functionsGravatar Jimmi Holst Christensen1-2/+10
2022-07-25Add clap.parsers.enumeration for parsing enumsGravatar Jimmi Holst Christensen1-0/+37
closes #78
2022-03-09Allow for clap to parse argument values into typesGravatar Jimmi Holst Christensen3-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.
2022-02-25Revert "Change clap into generating a struct"Gravatar Jimmi Holst Christensen3-400/+243
This reverts commit cfaac64c404fb1c2e892880410aa3b7dd881ea58.
2022-02-25Change clap into generating a structGravatar Jimmi Holst Christensen3-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`
2022-01-31Refactor the ArgIterator interfaceGravatar Jimmi Holst Christensen2-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`.
2021-12-29Update usage of process.ArgIterator to be inline with newest zigGravatar Jimmi Holst Christensen1-1/+1
Also add windows CI, as this compiler error was only triggered on windows builds
2021-12-06zig master updates: allocator changes (#60)Gravatar Asherah Connor2-6/+6
2021-11-29Fix chaining typoGravatar Jimmi Holst Christensen1-3/+3
fixes #58
2021-10-11Fix regression in last commitGravatar Komari Spaghetti1-1/+0
The importing of builtin was already fixed, so the latest commit applied this fix again, which caused problems
2021-10-11zig master updatesGravatar Asherah Connor2-2/+3
2021-10-09Fix uses of builtinGravatar Komari Spaghetti1-1/+1
2021-07-25Discard unused variableGravatar Sirius9021-1/+1
2021-07-16Forward diagnostics down to StreamingClapGravatar Komari Spaghetti1-5/+54
fixes #46
2021-06-24Fix all new compiler errors from zig masterGravatar Komari Spaghetti2-4/+5
2021-06-24Fix all new compiler errors from zig masterGravatar Komari Spaghetti2-4/+5
2021-06-24Stay under 100 chars per line in all the codeGravatar Komari Spaghetti3-8/+24
2021-05-26Update to latest zig in preperation for 0.8.0Gravatar Komari Spaghetti3-104/+118
2021-05-08Modernize codebaseGravatar Komari Spaghetti2-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
2021-04-28Refactor Diagnostic (and others) into a ParseOption structGravatar Komari Spaghetti2-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.
2021-01-10zig master updatesGravatar Asherah Connor1-1/+1
2020-11-21Support all arguments after -- being positionalsGravatar Jimmi Holst Christensen1-78/+106
2020-11-21Fix spelling errorGravatar Jimmi Holst Christensen1-1/+1
2020-11-21Implement ShellIteratorGravatar Jimmi Holst Christensen1-0/+262
fixes #30
2020-11-10Deprecate ComptimeClap in favor of parseExv0.3.0Gravatar Jimmi Holst Christensen1-4/+4
2020-11-10Better parseParamGravatar Jimmi Holst Christensen2-12/+2
2020-11-10Better parseParamGravatar Jimmi Holst Christensen2-12/+2
2020-11-03Improve Diagnostic error message reportingGravatar Jimmi Holst Christensen3-16/+80
2020-11-03Improve Diagnostic error message reportingGravatar Jimmi Holst Christensen3-16/+80
2020-11-02Replace `var` with `anytype`Gravatar Jimmi Holst Christensen1-1/+1
2020-11-02Report error context in Diagnostic (#26)Gravatar Komari Spaghetti2-44/+54
2020-11-02Report error context in Diagnostic (#26)Gravatar Komari Spaghetti2-44/+54
2020-11-01use null sentinel in OsIterator (#27)Gravatar Matthew Knight1-2/+2
2020-09-06adjust examples, README templateGravatar Asherah Connor1-3/+3
2020-09-06reverse the order of theseGravatar Asherah Connor1-9/+9
2020-09-06fix upGravatar Asherah Connor1-5/+8
2020-09-06separate options into single and multipleGravatar Asherah Connor1-25/+35
This avoids allocations if you never use multiple arguments.
2020-09-06parse and validate multiple optionGravatar Asherah Connor2-18/+39
2020-09-06parse multiple optionsGravatar Asherah Connor1-9/+22
2020-08-28reverse the order of theseGravatar Asherah Connor1-9/+9
2020-08-28fix upGravatar Asherah Connor1-5/+8