-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Don't show (default: true)
for negated option
#37
Labels
Comments
In fact, what should IMO happen is if there is a negated option, it should be merged with the affirmative case in the help, using the |
that's a good idea. |
interest in a PR? |
Sure 🤗 |
joaotavora
added a commit
to joaotavora/cac
that referenced
this issue
Feb 19, 2021
Probably doesn't make any practical difference, since this is only used for the Command array, but less lines of code :-) * src/utils.ts (findLongest)
joaotavora
added a commit
to joaotavora/cac
that referenced
this issue
Feb 19, 2021
Not only doesn't show the `(default: true)` for negated options, which was quite confusing, but merges them with the line describing the affirmative case. Added a new test. Since it relies on help output, it is a bit brittle, like the other "snapshot"-based ones. I didn't the same execa snapshot for this because it would make a test take a lot longer to run (becasue spawns a process). * README.md (Options): Mention [no-]foo syntax. * src/Command.ts (outputHelp): Consider options with negated counterparts when printing. * src/__test__/index.test.ts ('negated option help output'): New test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
--no-clean Don't clean output directory (default: true)
This is misleading, you might think
--no-clean
is enabled by default.The text was updated successfully, but these errors were encountered: