fix(help)!: Make DeriveDisplayOrder the default, removing it #3975
Merged
epage merged 3 commits intoclap-rs:masterfrom Jul 22, 2022
Merged
fix(help)!: Make DeriveDisplayOrder the default, removing it #3975epage merged 3 commits intoclap-rs:masterfrom
epage merged 3 commits intoclap-rs:masterfrom
Conversation
…rder` Previous behavior: - They'd be sorted by default - They'd derive display order if `DeriveDisplayOrder` was set - This could be set recursively - The initial display order value for subcommands was 0 New behavior: - Sorted order is derived by default - Sorting is turned on by `cmd.next_display_order(None)` - This is not recursive, it must be set on each level - The display order incrementing is mixed with arguments - This does make it slightly more difficult to predict
Force sorting with `next_display_order(None)` Fixes clap-rs#2808
792c961 to
655bb4b
Compare
This file contains hidden or 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
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.
Force sorting with
next_display_order(None)This also extends to subcommands.
Previous behavior:
DeriveDisplayOrderwas setNew behavior:
cmd.next_display_order(None)And with that, we can remove
AppSettingsfrom the API, helping towards #3021Fixes #2808