Hide commands that aren't terribly useful to end users.

This commit is contained in:
Renan DelValle 2019-03-25 08:30:25 -07:00
parent 1a18f21e46
commit ddc9bc408a
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
2 changed files with 8 additions and 5 deletions

View file

@ -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.")
}

View file

@ -7,6 +7,7 @@ import (
func init() {
rootCmd.AddCommand(docsCmd)
docsCmd.Hidden = true
}
var docsCmd = &cobra.Command{