mirror of https://github.com/spf13/cobra.git
Fix typo sh completion docs (#1678)
This commit is contained in:
parent
b9460ccc12
commit
d8184d3269
|
@ -122,7 +122,7 @@ For example, if you want `kubectl get [tab][tab]` to show a list of valid "nouns
|
||||||
Some simplified code from `kubectl get` looks like:
|
Some simplified code from `kubectl get` looks like:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
validArgs []string = { "pod", "node", "service", "replicationcontroller" }
|
validArgs = []string{ "pod", "node", "service", "replicationcontroller" }
|
||||||
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "get [(-o|--output=)json|yaml|template|...] (RESOURCE [NAME] | RESOURCE/NAME ...)",
|
Use: "get [(-o|--output=)json|yaml|template|...] (RESOURCE [NAME] | RESOURCE/NAME ...)",
|
||||||
|
@ -148,7 +148,7 @@ node pod replicationcontroller service
|
||||||
If your nouns have aliases, you can define them alongside `ValidArgs` using `ArgAliases`:
|
If your nouns have aliases, you can define them alongside `ValidArgs` using `ArgAliases`:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
argAliases []string = { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" }
|
argAliases = []string { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" }
|
||||||
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in New Issue