Skip to content

fix: parse explicit short flag values - #511

Open
Rayan-and-beyond wants to merge 1 commit into
spf13:masterfrom
Rayan-and-beyond:fix/short-noopt-explicit-value
Open

Rayan-and-beyond wants to merge 1 commit into
spf13:masterfrom
Rayan-and-beyond:fix/short-noopt-explicit-value

Conversation

@Rayan-and-beyond

Copy link
Copy Markdown

Fixes #207.

A shorthand with NoOptDefVal now accepts a following non-flag token as an explicit value, while preserving the existing shorthand-cluster and boolean behavior. So -v explicit can override the no-option default, but -vb still uses -v's default and continues with -b.

The README now spells out that cluster behavior and the two unambiguous ways to pass an explicit value.

Checked with:

  • focused shorthand/NoOptDefVal parser tests
  • go test .
  • gofmt
  • git diff --check

@CLAassistant

CLAassistant commented Sep 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

Processing of short-form arguments when NoOptDefVal is set

2 participants