zig-clap-0.3.0
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 beclap.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.
- To get multiple options your parameters need to have the
- All parsers now take an extra diagnostic parameter, which can be used to report more useful error messages.
- The
clap.Diagnostic
struct has areport
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.
- The
New
clap.parseParam
now supports parsing positional parameter help messages.- Syntax is as follows:
clap.parseParam("<P> This is a positional parameter")
.
- Syntax is as follows:
clap.args.OsIterator
now returns null-terminated strings.
Fixes
- No longer gives compile error for 32 bit targets (#23)