fix: hide help sub-command & persist help flag
This commit is contained in:
parent
878247e46d
commit
4580ea9dc8
@ -5,10 +5,11 @@ import (
|
||||
)
|
||||
|
||||
var AppCommand = cli.Command{
|
||||
Name: "app",
|
||||
Aliases: []string{"a"},
|
||||
Usage: "Manage apps",
|
||||
ArgsUsage: "<domain>",
|
||||
Name: "app",
|
||||
Aliases: []string{"a"},
|
||||
Usage: "Manage apps",
|
||||
ArgsUsage: "<domain>",
|
||||
HideHelpCommand: true,
|
||||
Commands: []*cli.Command{
|
||||
&appBackupCommand,
|
||||
&appCheckCommand,
|
||||
|
@ -20,9 +20,10 @@ import (
|
||||
)
|
||||
|
||||
var catalogueGenerateCommand = cli.Command{
|
||||
Name: "generate",
|
||||
Aliases: []string{"g"},
|
||||
Usage: "Generate the recipe catalogue",
|
||||
Name: "generate",
|
||||
Aliases: []string{"g"},
|
||||
Usage: "Generate the recipe catalogue",
|
||||
HideHelpCommand: true,
|
||||
Flags: []cli.Flag{
|
||||
internal.NoInputFlag,
|
||||
internal.PublishFlag,
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ for you.
|
||||
Anyone who uses a recipe can become a maintainer. Maintainers typically make
|
||||
sure the recipe is in good working order and the config upgraded in a timely
|
||||
manner.`,
|
||||
HideHelpCommand: true,
|
||||
Commands: []*cli.Command{
|
||||
&recipeFetchCommand,
|
||||
&recipeLintCommand,
|
||||
|
@ -6,9 +6,10 @@ import (
|
||||
|
||||
// ServerCommand defines the `abra server` command and its subcommands
|
||||
var ServerCommand = cli.Command{
|
||||
Name: "server",
|
||||
Aliases: []string{"s"},
|
||||
Usage: "Manage servers",
|
||||
Name: "server",
|
||||
Aliases: []string{"s"},
|
||||
Usage: "Manage servers",
|
||||
HideHelpCommand: true,
|
||||
Commands: []*cli.Command{
|
||||
&serverAddCommand,
|
||||
&serverListCommand,
|
||||
|
@ -480,7 +480,8 @@ func newAbraApp(version, commit string) *cli.Command {
|
||||
\____\___/ \___/| .__/ \____|_|\___/ \__,_|\__,_|
|
||||
|_|
|
||||
`,
|
||||
Version: fmt.Sprintf("%s-%s", version, commit[:7]),
|
||||
Version: fmt.Sprintf("%s-%s", version, commit[:7]),
|
||||
HideHelpCommand: true,
|
||||
Commands: []*cli.Command{
|
||||
&Notify,
|
||||
&UpgradeApp,
|
||||
|
Loading…
x
Reference in New Issue
Block a user