Skip to content

v0.3.0

Compare
Choose a tag to compare
@prajwalch prajwalch released this 23 Sep 07:25

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 and ArgsContext which is previously returned by the Command.parseProcess and Command.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 its Arg.setDescription setter

Breaking changes:

  • Command.parseFrom and Command.parseProcess is moved to Yazap
  • Command.about is renamed to Command.description
  • Command.newWithHelpTxt is renamed to Command.newWithDescription
  • Now flag.* functions takes a description 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)