fix: hide help sub-command & persist help flag

This commit is contained in:
2024-07-09 16:43:10 +02:00
parent 878247e46d
commit 4580ea9dc8
6 changed files with 24 additions and 11 deletions

View File

@ -167,6 +167,7 @@ func newAbraApp(version, commit string) *cli.Command {
},
EnableShellCompletion: true,
UseShortOptionHandling: true,
HideHelpCommand: true,
ShellComplete: autocomplete.SubcommandComplete,
}
@ -194,6 +195,13 @@ func newAbraApp(version, commit string) *cli.Command {
return nil
}
cli.HelpFlag = &cli.BoolFlag{
Name: "help",
Aliases: []string{"h, H"},
Usage: "Show help",
Persistent: true,
}
return app
}