Fixed code sample for bash completion (#687)
This commit is contained in:
parent
0ab5b6bcfc
commit
ef82de70bb
@ -181,7 +181,7 @@ a custom flag completion function with cobra.BashCompCustom:
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
annotation := make(map[string][]string)
|
annotation := make(map[string][]string)
|
||||||
annotation[cobra.BashCompFilenameExt] = []string{"__kubectl_get_namespaces"}
|
annotation[cobra.BashCompCustom] = []string{"__kubectl_get_namespaces"}
|
||||||
|
|
||||||
flag := &pflag.Flag{
|
flag := &pflag.Flag{
|
||||||
Name: "namespace",
|
Name: "namespace",
|
||||||
|
Loading…
Reference in New Issue
Block a user