v0.3.0
What's new:
-
Added new Yazap as a main entry point for library. (b3a78ad)
Now you have to use Yazap.init to initialize the library and Yazap.deinit to deinitilize all the structures at once. Previously you had to deinitilize the two structures (
Command
andArgsContext
which is previously returned by theCommand.parseProcess
andCommand.parseFrom
) by yourself. -
Auto help text generation
Now you don't need to defined
-h, --help
flag and handle it manually. yazap can now build and display help text dynamically based on provided arguments and their settings.Note: For now help will be displayed when
-h, --help
is provided but not on error. Once help will be displayed all the structures will be deinitilize and app will exit gracefully. -
Added
Arg.description
and itsArg.setDescription
setter
Breaking changes:
Command.parseFrom
andCommand.parseProcess
is moved toYazap
Command.about
is renamed toCommand.description
Command.newWithHelpTxt
is renamed toCommand.newWithDescription
- Now
flag.*
functions takes adescription
of type?[]const u8
as a last parameter
Fixes:
- Thread panic error/Incorrect or an unexpected error message to be logged when an error used to occur when parsing subcommand's argument and trying to log error using root command error trace. (4c1f7de)
- Value outside of Arg.allowed_values to be consumed without verifying it. (dcb7518)