Files
terraform-docs/cmd/completion/bash/bash.go
Khosrow Moossavi 04a9ef49eb refactor: Refactor cli implemention and configuration (#266)
* Refactor cli implemention and configuration

* cleanup
2020-05-20 22:21:19 -04:00

21 lines
416 B
Go

package bash
import (
"os"
"github.com/spf13/cobra"
)
// NewCommand returns a new cobra.Command for 'completion bash' command
func NewCommand() *cobra.Command {
cmd := &cobra.Command{
Args: cobra.NoArgs,
Use: "bash",
Short: "Generate shell completion for bash",
RunE: func(cmd *cobra.Command, args []string) error {
return cmd.Parent().Parent().GenBashCompletion(os.Stdout)
},
}
return cmd
}