21 lines
336 B
Go
21 lines
336 B
Go
package completion
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var zshCompletionCmd = &cobra.Command{
|
|
Use: "zsh",
|
|
Short: "Generate a zsh completion file",
|
|
Args: cobra.NoArgs,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
rootCmd.GenZshCompletion(os.Stdout)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
completionCmd.AddCommand(zshCompletionCmd)
|
|
}
|