Skip to content

feat: add opt-in metavars to flag help - #106

Open
integrii wants to merge 4 commits into
masterfrom
feat/issue-105-metavars
Open

feat: add opt-in metavars to flag help#106
integrii wants to merge 4 commits into
masterfrom
feat/issue-105-metavars

Conversation

@integrii

Copy link
Copy Markdown
Owner

Adds opt-in metavars for non-toggle flags in help output.

Changes:

  • Derives metavars from long names, with short-name fallback.
  • Keeps metavars disabled by default.
  • Adds parser and package-level enable/disable helpers.
  • Leaves boolean toggles without metavars.
  • Documents the behavior and adds focused tests.

Related to #105.

Validation: goimports, gofmt, go vet ./..., go test ./...

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
@integrii

Copy link
Copy Markdown
Owner Author

Added a regression test for the rendered columns. With metavars enabled, every long flag and every description now shares one global start column, including built-in --version/--help and flags with or without short names.

integrii and others added 2 commits July 28, 2026 21:33
Co-authored-by: Codex <codex@openai.com>
@integrii
integrii marked this pull request as ready for review July 29, 2026 05:10

@flaggy-community-bot flaggy-community-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete: no blocking correctness, regression, security, or maintainability findings. The opt-in default preserves existing help output; bool and []bool toggles remain without metavars; long-name and short-only derivation plus alignment are covered by tests. Validation passed: go test ./..., go vet ./..., gofmt -l ., and git diff --check. Recommendation: merge.

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