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

Adding bash completion for codegen and for the server #143

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}