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