Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
Adding bash completion for codegen and for the server
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Hein <me@christopherhein.com>
  • Loading branch information
christopherhein committed Nov 28, 2018
1 parent e6a6bc9 commit 98ef534
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cmd/aws-service-operator/completion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package main

import (
"os"

"github.com/spf13/cobra"
)

var completionCmd = &cobra.Command{
Use: "completion",
Short: "Generates the bash completion scripts",
Long: `To load completion run
. <(aws-service-operator completion)`,
Run: func(cmd *cobra.Command, args []string) {
rootCmd.GenBashCompletion(os.Stdout)
},
}

func init() {
rootCmd.AddCommand(completionCmd)
}
21 changes: 21 additions & 0 deletions code-generation/cmd/aws-service-operator-codegen/completion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package main

import (
"os"

"github.com/spf13/cobra"
)

var completionCmd = &cobra.Command{
Use: "completion",
Short: "Generates the bash completion scripts",
Long: `To load completion run
. <(aws-service-operator-codegen completion)`,
Run: func(cmd *cobra.Command, args []string) {
rootCmd.GenBashCompletion(os.Stdout)
},
}

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

0 comments on commit 98ef534

Please sign in to comment.