Skip to content

Commit

Permalink
Update the bash completion example for kubectl (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
bamarni authored and eparis committed Mar 1, 2018
1 parent 6644d46 commit c6c44e6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bash_completions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ Generating bash completions from a cobra command is incredibly easy. An actual p
package main

import (
"io/ioutil"
"os"
"io/ioutil"
"os"

"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd"
"k8s.io/kubernetes/pkg/kubectl/cmd"
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
)

func main() {
kubectl := cmd.NewFactory(nil).NewKubectlCommand(os.Stdin, ioutil.Discard, ioutil.Discard)
kubectl.GenBashCompletionFile("out.sh")
kubectl := cmd.NewKubectlCommand(util.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
kubectl.GenBashCompletionFile("out.sh")
}
```

Expand Down

0 comments on commit c6c44e6

Please sign in to comment.