cli: Remove help sub-command and --version flag (#2030)
This is to bring consistent CLI experience as before.
This commit is contained in:
committed by
Anis Elleuch
parent
1cfb326e2f
commit
2ca601ef22
+4
-1
@@ -51,8 +51,10 @@ type Command struct {
|
||||
// removed n version 2 since it only works under specific conditions so we
|
||||
// backport here by exposing it as an option for compatibility.
|
||||
SkipArgReorder bool
|
||||
// Boolean to hide built-in help command
|
||||
// Boolean to hide built-in help flag
|
||||
HideHelp bool
|
||||
// Boolean to hide built-in help command
|
||||
HideHelpCommand bool
|
||||
// Boolean to hide this command from help or completion
|
||||
Hidden bool
|
||||
|
||||
@@ -261,6 +263,7 @@ func (c Command) startApp(ctx *Context) error {
|
||||
app.Commands = c.Subcommands
|
||||
app.Flags = c.Flags
|
||||
app.HideHelp = c.HideHelp
|
||||
app.HideHelpCommand = c.HideHelpCommand
|
||||
|
||||
app.Version = ctx.App.Version
|
||||
app.HideVersion = ctx.App.HideVersion
|
||||
|
||||
Reference in New Issue
Block a user