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(help)!: Merge OPTIONS / FLAGS default groups #2867
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pksunkara
requested changes
Oct 12, 2021
Closed
2 tasks
epage
force-pushed
the
unified
branch
3 times, most recently
from
October 13, 2021 14:24
8977e95
to
cc3c67b
Compare
pksunkara
approved these changes
Oct 13, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
👎 Rejected by PR status |
Looks like a small rebase issue. Feel free to merge after replacing that setting |
For those that want the original behavior, you can usxe `arg.help_heading(Some("FLAGS"))` on your flags. Limitations: - This will not give you a special sort order - This will not get a `[FLAGS]` added to usage For templates, we removed `{unified}` and `{flags}`. To help people catch these, a debug_assert was added. I'm unsure but I think there might be a change in behavior in calcuating when to show `[OPTION]` in usage. The old code only looked at `required` while flags looked only at arg groups. We now look at both. Ideally we'd add these in `_build` and remove special casing for no-groups except in the sort order of groups. I feel like thats best left for later. This also reduced the scope of `App`s public API. `get_*_with_no_heading` seemed a bit specialized to be in the public API. clap-rs#2853 looks at splitting it out into its own PR. BREAKING CHANGE: Multiple - `UnifiedHelpMessage` removed - `{flags}` and `{unified}` are removed and will assert when present. - `get_*_with_no_heading` removed Fixes clap-rs#2807
bors retry |
bors r+ |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For those that want the original behavior, you can usxe
arg.help_heading(Some("FLAGS"))
on your flags. Limitations:[FLAGS]
added to usage{flags}
template variableFor templates, we removed
{unified}
and{flags}
. To help peoplecatch these, a debug_assert was added.
I'm unsure but I think there might be a change in behavior in calcuating
when to show
[OPTION]
in usage. The old code only looked atrequired
while flags looked only at arg groups. We now look at both.Ideally we'd default help headings in
_build
and remove special casing forno-groups except in the sort order of groups. I feel like thats best
left for later.
This also reduced the scope of
App
s public API.get_*_with_no_heading
seemed a bit specialized to be in the publicAPI. #2853 looks at splitting it out into its own PR.
The most interesting changes are in
Followed by
BREAKING CHANGE: Multiple
UnifiedHelpMessage
removed{flags}
and{unified}
are removed and will assert when present.get_*_with_no_heading
removedFixes #2807