diff options
-rw-r--r-- | gobgp/cmd/root.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gobgp/cmd/root.go b/gobgp/cmd/root.go index 6ded72e7..58028881 100644 --- a/gobgp/cmd/root.go +++ b/gobgp/cmd/root.go @@ -44,7 +44,11 @@ func NewRootCmd() *cobra.Command { } }, Run: func(cmd *cobra.Command, args []string) { - cmd.GenBashCompletionFile(globalOpts.BashCmplFile) + if globalOpts.GenCmpl { + cmd.GenBashCompletionFile(globalOpts.BashCmplFile) + } else { + cmd.HelpFunc()(cmd, args) + } }, } |