github Hejsil/zig-clap 0.10.0

latest release: 0.11.0
6 months ago

zig-clap release 0.10.0 which compiles and works for zig 0.14.0

Features

  • Add assignment_separators to clap.ParseOptions
    • This specifies the list of characters that can separate arguments. By default it is "="
    • Setting assignment_separators to "=:" will make both --some-arg:value and --some-arg=value valid argument syntax
  • Add terminating_positional to clap.ParseOptions
  • Add clap.parsers.uint

Changes

  • clap.HelpOptions.max_width is now unicode codepoint aware instead of just counting bytes
  • clap.parse and clap.parseEx now supports parsing multiple parameters of different types
    • res.positionals is now a tuple. Users of zig-clap 0.9.1 needs to update res.positionals to res.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 #153

Don't miss a new zig-clap release

NewReleases is sending notifications on new releases.