Skip to content

Commit

Permalink
Fix root command help
Browse files Browse the repository at this point in the history
Change-Id: Ib5ee8a891f010f086e061fca691430aad02926e3
  • Loading branch information
jxskiss committed Jan 23, 2024
1 parent 551fe95 commit 09787eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ func (p *App) helpCmd() {

// i.e. "program help"
if len(ctx.ambiguousArgs) == 0 {
p.runWithArgs(nil, true)
p.runWithArgs([]string{"-h"}, true)
return
}

Expand Down
1 change: 1 addition & 0 deletions examples/containers/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func main() {
app.SetGlobalFlags(&globalFlags)
app.AddRoot(cmdRoot)
app.AddCompletion()
app.AddHelp()
app.Options.EnableFlagCompletionForAllCommands = true
app.Run()
}
Expand Down

0 comments on commit 09787eb

Please sign in to comment.