summaryrefslogtreecommitdiff
path: root/clap.zig (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-12-13Remove the default allocator from `ParseOptions`no-default-allocatorGravatar Jimmi Holst Christensen1-6/+1
fixes #111
2023-11-16Fix short only params not getting fields in `Arguments`Gravatar Jimmi Holst Christensen1-10/+11
fixes #84
2023-06-27Update to latest zigGravatar Jimmi Holst Christensen1-12/+12
2023-06-22Update to latest zigGravatar Jimmi Holst Christensen1-2/+2
2023-06-18Update to latest version of zigGravatar Jimmi Holst Christensen1-1/+1
2023-06-15help,usage: Support multiple positionals (#97)Gravatar Andreas Herrmann1-16/+43
2023-04-02Count occurrences of flags (was "Add .count type for flags") (#96)Gravatar Devin J. Pohly1-5/+21
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-02-22chore: update to latest masterGravatar Rekai Musuka1-2/+2
update to follow latest for loop syntax
2023-01-12Fix misspelled thingsGravatar Jimmi Holst Christensen1-9/+9
2022-12-20Update to latest Zig masterGravatar Jakub Konka1-4/+4
Rename `builtin.Struct.field_type` to `builtin.Struct.type`.
2022-12-01Handle change to std.ArrayList(T).toOwnedSlice()Gravatar Rekai Musuka1-3/+3
toOwnedSlice() now returns an error union
2022-11-22Workaround stage2 bugGravatar Jimmi Holst Christensen1-1/+3
2022-10-03Fix regression from last commitGravatar Jimmi Holst Christensen1-11/+14
2022-10-03Add function for getting the prefix of a param nameGravatar Jimmi Holst Christensen1-15/+19
2022-09-18use builtin.Type instead of deprecated builtin.TypeInfoGravatar Jakub Konka1-1/+1
Syncs with latest zig master version 0.10.0-dev.4117+54854e2ab
2022-08-25Fix zig-clap for new default compilerGravatar Jimmi Holst Christensen1-37/+50
Also enable test suit for both stage 1 and stage 2, to ensure we don't break things for people who haven't switched yet.
2022-07-28Have all tests have a nameGravatar Jimmi Holst Christensen1-1/+1
fixes #79
2022-04-28Print multi value positionals correctly in `usage`Gravatar Jimmi Holst Christensen1-0/+6
2022-03-30New `help` api that provides options as to how paramters are printed.Gravatar Jimmi Holst Christensen1-92/+686
fixes \#28
2022-03-24Fix long param parsing with '-' and '\_' in nameGravatar Jimmi Holst Christensen1-2/+6
2022-03-23Add parseParams and friendsGravatar Jimmi Holst Christensen1-341/+389
2022-03-23Refactor parseParam into a state machineGravatar Jimmi Holst Christensen1-64/+279
This new parser stops when it hits something that looks like a new parameter. This is the precurser to parsing multiple parameters in a single function.
2022-03-21Workaround infinit loop caused by `try` inside `inline for`Gravatar Jimmi Holst Christensen1-19/+59
fixes #72
2022-03-09Allow for clap to parse argument values into typesGravatar Jimmi Holst Christensen1-181/+365
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 Christensen1-48/+217
This reverts commit cfaac64c404fb1c2e892880410aa3b7dd881ea58.
2022-02-25Change clap into generating a structGravatar Jimmi Holst Christensen1-217/+48
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 Christensen1-4/+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`.
2022-01-05Avoid using the print APIGravatar Jimmi Holst Christensen1-23/+37
The current Zig print API is quite good at slowing down compilation and producing binary bloat. This commit makes an attempt to avoid using it when not nessesary.
2021-12-06zig master updates: allocator changes (#60)Gravatar Asherah Connor1-2/+2
2021-09-06Update mem.split call for latest zig masterGravatar Ryan Liptak1-1/+1
2021-09-05Indent help text on every new line to allow for user-controlled wrappingGravatar Ryan Liptak1-1/+14
2021-08-11Update calls to tokenizerGravatar Stephen Gregoratto1-1/+1
The tokenize function was made generic, so we have to pass the type as the first parameter.
2021-06-24Fix all new compiler errors from zig masterGravatar Komari Spaghetti1-1/+1
2021-06-24Fix all new compiler errors from zig masterGravatar Komari Spaghetti1-1/+1
2021-06-24Stay under 100 chars per line in all the codeGravatar Komari Spaghetti1-33/+87
2021-06-24parseParam: Set eval quota to std.math.maxInt(u32)Gravatar Komari Spaghetti1-0/+10
fixes #42 related #39
2021-06-24parse: Copy in arena after using it in parseExGravatar Komari Spaghetti1-11/+9
fixes #43
2021-05-26Update to latest zig in preperation for 0.8.0Gravatar Komari Spaghetti1-64/+64
2021-05-08Modernize codebaseGravatar Komari Spaghetti1-140/+71
* 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 Spaghetti1-10/+26
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-21/+21
2020-11-10Deprecate ComptimeClap in favor of parseExv0.3.0Gravatar Jimmi Holst Christensen1-5/+16
2020-11-10Better parseParamGravatar Jimmi Holst Christensen1-188/+144
2020-11-10Better parseParamGravatar Jimmi Holst Christensen1-188/+144
2020-11-03Improve Diagnostic error message reportingGravatar Jimmi Holst Christensen1-16/+27
2020-11-03Improve Diagnostic error message reportingGravatar Jimmi Holst Christensen1-16/+27
2020-11-02Replace `var` with `anytype`Gravatar Jimmi Holst Christensen1-1/+1
2020-11-02Report error context in Diagnostic (#26)Gravatar Komari Spaghetti1-2/+49
2020-11-02Report error context in Diagnostic (#26)Gravatar Komari Spaghetti1-2/+49
2020-09-06fix upGravatar Asherah Connor1-2/+2