zig-clap
release 0.4.0
which compiles and works for zig 0.8.0
.
Changes
Breaking
- Arguments after
--
will now all be treated like positional arguments, even if they match something else.-a -b
gives you the flagsa
andb
-a -- -b
gives you the flaga
and the positional argument-b
.- This applies to both
clap.StreamingClap
andclap.parse
.
clap.parse
andclap.parseEx
now takes aParserOptions
- This removes the
allocator
anddiag
arguments from these functions and moves them into this new struct. - This change has been made to make it possible to introduce more options to these functions in the future without breaking the API again.
- This removes the
clap.StreamingClap.next
no longer takes thediag
argument.- Instead, a
diagnostic
field have been added to this parser.
- Instead, a
- All enums have had their members names changed to
snake_case
.
New
- Added new
args.ShellIterator
(this might actually have been in0.3.0
but it wasn't in the release notes 🤷)- This iterator takes a single string and splits it into arguments similarly to how
sh
orbash
would. - See the tests to get an idea as to how this iterator splits arguments.
- This iterator takes a single string and splits it into arguments similarly to how
- You should now be able to install
zig-clap
through bothgyro
andzigmod
package managers.zig-clap
can also be found on theastrolab
package repository.