Repository navigation
fix: Update cli usage template for cobra feature parity - #1463
Merged
Merged
Conversation
deansheather
approved these changes
May 16, 2022
deansheather
left a comment
Collaborator
There was a problem hiding this comment.
syntax seems fine but if you could quickly tidy up the template that would be nice 👍
johnstcn
approved these changes
May 16, 2022
johnstcn
left a comment
Member
There was a problem hiding this comment.
LGTM as well, just some cleanup 👍
1 task done
kylecarbs
approved these changes
May 16, 2022
kylecarbs
left a comment
Member
There was a problem hiding this comment.
LGTM. My bad for missing a few of these cases!
Member
|
How does the template not have excessive newlines when sections are omitted? Is there something cleaning that up? The Cobra one has to put conditional blocks on the same line to (what I assume) prevent the extra newlines: https://github.com/spf13/cobra/blob/master/command.go#L502-L525 |
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.
This PR updates the custom usage template for feature parity with the default template used in Cobra.
I've restored the custom heading names and colorization.
Changes:
This is partially related to #1233 and #1403, but as suggested by @jsjoeio, split into a separate PR.
Fixes #1423
Example:
