Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: conditionally print negative boolean argument usage #177

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BobbieGoede
Copy link

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)

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
1 participant