Removes the use of init() to initialize the variable. - Closes: #1596 - See also: #1569 Signed-off-by: Jonathon Anderson <janderson@ciq.com>
20 lines
381 B
Go
20 lines
381 B
Go
package completions
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
var (
|
|
baseCmd = &cobra.Command{
|
|
Use: "completions",
|
|
Short: "shell completion",
|
|
Long: "This command generates the bash completions if no argument is given.",
|
|
RunE: CobraRunE,
|
|
Args: cobra.MaximumNArgs(1),
|
|
Aliases: []string{"bash"},
|
|
}
|
|
Zsh bool
|
|
)
|
|
|
|
func GetCommand() *cobra.Command {
|
|
return baseCmd
|
|
}
|