New
0.10.0
zig-clap release 0.10.0 which compiles and works for zig 0.14.0
Features
- Add
assignment_separatorstoclap.ParseOptions- This specifies the list of characters that can separate arguments. By default it is
"=" - Setting
assignment_separatorsto"=:"will make both--some-arg:valueand--some-arg=valuevalid argument syntax
- This specifies the list of characters that can separate arguments. By default it is
- Add
terminating_positionaltoclap.ParseOptions- This specifies the last positional index that
zig-clapwill parse before returning - This makes subcommands easier to parse with
zig-clap- See https://github.com/Hejsil/zig-clap/blob/master/example/subcommands.zig
- This specifies the last positional index that
- Add
clap.parsers.uint
Changes
clap.HelpOptions.max_widthis now unicode codepoint aware instead of just counting bytesclap.parseandclap.parseExnow supports parsing multiple parameters of different typesres.positionalsis now a tuple. Users ofzig-clap0.9.1needs to updateres.positionalstores.positionals[0]- This allows specifying
program <u8> <str>...and have@TypeOf(res.positionals[0]) == u8 and @TypeOf(res.positionals[1]) == []const []const u8 - There are some limits to how multiple positional parameters can be defined. See https://github.com/Hejsil/zig-clap/issues/153