github Hejsil/zig-clap v0.3.0
zig-clap-0.3.0

latest releases: 0.9.1, 0.9.0, 0.8.0...
3 years ago

A new release of zig-clap for zig 0.7.0

Changes

Breaking

  • Now compilers with the zig 0.7.0 compiler.
  • clap.parse now supports capturing multiple options.
    • To get multiple options your parameters need to have the take_values field be clap.Values.Many.
      • clap.parseParam has syntax for this: clap.parseParam("-s, --ss <V>... This is a help message").
    • The options function can be called to get a slice of all options passed the parameter.
  • All parsers now take an extra diagnostic parameter, which can be used to report more useful error messages.
    • The clap.Diagnostic struct has a report method which prints a simple English error message.
      • Use this as a reference if you want to implement error reporting yourself.
    • null can be pass if the caller does not care about this extra information.

New

  • clap.parseParam now supports parsing positional parameter help messages.
    • Syntax is as follows: clap.parseParam("<P> This is a positional parameter").
  • clap.args.OsIterator now returns null-terminated strings.

Fixes

  • No longer gives compile error for 32 bit targets (#23)

Don't miss a new zig-clap release

NewReleases is sending notifications on new releases.