Skip to content

Commit

Permalink
completion: added bash completion generator command
Browse files Browse the repository at this point in the history
  • Loading branch information
phiros committed Apr 5, 2019
1 parent cb03bd4 commit 8fbb190
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cmd/completion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package cmd

import (
"github.com/spf13/cobra"
"os"
)

func init() {
rootCmd.AddCommand(completionCommand)
}

var completionCommand = &cobra.Command{
Use: "completion",
Short: "generates a bash autocomplete script",
RunE: func(cmd *cobra.Command, args []string) error {
return rootCmd.GenBashCompletion(os.Stdout)
},
}

0 comments on commit 8fbb190

Please sign in to comment.