Skip to content

Conversation

@BobbieGoede
Copy link
Contributor

This is currently marked breaking (fix!:) but it doesn't functionally change usage, only the usage printing is changed, whether that is breaking is a bit subjective 🤔

This PR changes the argument usage text for boolean arguments:

  • Normal usage is always printed and uses description
  • Print negative usage when either
    • Argument is enabled by default
    • negativeDescription is defined (not empty)
  • Do not print negative usage when
    • Argument name starts with negative prefix, either no- or no[A-Z]
  • Negative usage description prints negativeDescription or empty text

Resolves #176
(FYI, I have changed the issue scope slightly)

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thnx!

@pi0 pi0 merged commit da0b247 into unjs:main Mar 8, 2025
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.

print --no-[arg] in usage text

2 participants