Skip to content

Introcduce OPTLY_NO_AUTO_HELP and OPTLY_NO_AUTO_VERSION - #9

Merged
Strongleong merged 15 commits into
masterfrom
feat/no-auto-help
Nov 30, 2026
Merged

Strongleong merged 15 commits into
masterfrom
feat/no-auto-help

Conversation

@Strongleong

Copy link
Copy Markdown
Owner

Added

  • OPTLY_NO_AUTO_HELP and OPTLY_NO_AUTO_VERSION. When defined, generated
    help/version flags and commands are parsed normally instead of being handled
    automatically. This allows applications to implement their own help and
    version handling.
  • Generated help commands now accept an optional command name, allowing help
    output for specific commands and subcommands.
  • Tests covering all combinations of generated help/version flags and commands
    with automatic handling enabled or disabled.

Changed

  • optly_get_flag() now accepts an OptlyCommand pointer as its first
    argument, allowing flags to be looked up in the scope of a specific command.
  • optly_parse_args() now accepts the version string only when automatic
    version handling is enabled. When OPTLY_NO_AUTO_VERSION is defined, the
    version argument is no longer required.

Breaking

  • optly_get_flag() now requires an OptlyCommand pointer as its first
    argument. Existing calls must be updated.
  • The optly_parse_args() signature depends on the version-handling
    configuration. Update existing calls accordingly.

@Strongleong
Strongleong merged commit c4a2945 into master Nov 30, 2026
4 checks passed
@Strongleong
Strongleong deleted the feat/no-auto-help branch November 30, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant