Repository navigation
fix(help): show command flags in 'fastly help <subcommand>' matching '--help' - #1972
Merged
philippschulte merged 3 commits intoNov 17, 2026
Merged
Conversation
…'--help' Signed-off-by: Tyagiquamar <[email protected]>
Member
|
@Tyagiquamar please update the description by using our template. Thank you! |
Signed-off-by: Tyagiquamar <[email protected]>
Contributor
Author
|
@philippschulte Done! I have updated the PR description using the repository template with the change summary and checklists. Thank you! |
philippschulte
approved these changes
Nov 17, 2026
philippschulte
left a comment
Member
There was a problem hiding this comment.
Thanks for the contribution and for addressing this inconsistency!
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.
Change summary
Running
fastly <subcommand> --helpdisplays command-specific flags underREQUIRED FLAGSandOPTIONAL FLAGS, followed byGLOBAL FLAGS. However, runningfastly help <subcommand>(e.g.fastly help service create) only printedGLOBAL FLAGSand completely omitted the subcommand's required and optional flags, as well as its detailed description.In
pkg/app/usage.go,VerboseUsageTemplate(the template used when parsing Kingpin help commands viaapp.Parse("help ...")) only included blocks forSUBCOMMANDSandGLOBAL FLAGS. It lacked template directives to render.Context.SelectedCommand.Helpas well as.Context.Flags|RequiredFlagsand.Context.Flags|OptionalFlags.This PR updates
VerboseUsageTemplateinpkg/app/usage.goto render command descriptions and flags, and adds regression unit tests inpkg/app/run_test.go(TestHelpSubcommandFlags).Fixes #950
All Submissions:
Changes to Core Features:
User Impact
Users executing
fastly help <subcommand>now see the full command description, required flags, and optional flags matching<subcommand> --help.Are there any considerations that need to be addressed for release?
None. No breaking changes.