mirror of
https://github.com/spf13/cobra
synced 2025-05-06 05:17:21 +00:00
Fixed code sample for bash completion
This commit is contained in:
parent
0ab5b6bcfc
commit
35c4666302
1 changed files with 1 additions and 1 deletions
|
@ -181,7 +181,7 @@ a custom flag completion function with cobra.BashCompCustom:
|
|||
|
||||
```go
|
||||
annotation := make(map[string][]string)
|
||||
annotation[cobra.BashCompFilenameExt] = []string{"__kubectl_get_namespaces"}
|
||||
annotation[cobra.BashCompCustom] = []string{"__kubectl_get_namespaces"}
|
||||
|
||||
flag := &pflag.Flag{
|
||||
Name: "namespace",
|
||||
|
|
Loading…
Add table
Reference in a new issue