diff --git a/cmd/completion.go b/cmd/completion.go index 66cb993..0aec827 100644 --- a/cmd/completion.go +++ b/cmd/completion.go @@ -4,6 +4,13 @@ import ( "github.com/spf13/cobra" ) +func init() { + rootCmd.AddCommand(completionCmd) + + completionCmd.Hidden = true + completionCmd.Flags().StringVar(&filename, "filename", "australis.completion.sh", "Path and name of the autocompletion file.") +} + var completionCmd = &cobra.Command{ Use: "autocomplete", Short: "Create auto completion for bash.", @@ -22,8 +29,3 @@ In MacOS this directory is $(brew --prefix)/etc/bash_completion.d if auto comple }, } -func init() { - rootCmd.AddCommand(completionCmd) - - completionCmd.Flags().StringVar(&filename, "filename", "australis.completion.sh", "Path and name of the autocompletion file.") -} diff --git a/cmd/docs.go b/cmd/docs.go index 53bee25..0358bce 100644 --- a/cmd/docs.go +++ b/cmd/docs.go @@ -7,6 +7,7 @@ import ( func init() { rootCmd.AddCommand(docsCmd) + docsCmd.Hidden = true } var docsCmd = &cobra.Command{