Skip to content

Commit

Permalink
Fix typo sh completion docs (#1678)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldn committed Apr 27, 2022
1 parent b9460cc commit d8184d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shell_completions.md
Expand Up @@ -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:

```go
validArgs []string = { "pod", "node", "service", "replicationcontroller" }
validArgs = []string{ "pod", "node", "service", "replicationcontroller" }

cmd := &cobra.Command{
Use: "get [(-o|--output=)json|yaml|template|...] (RESOURCE [NAME] | RESOURCE/NAME ...)",
Expand All @@ -148,7 +148,7 @@ node pod replicationcontroller service
If your nouns have aliases, you can define them alongside `ValidArgs` using `ArgAliases`:

```go
argAliases []string = { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" }
argAliases = []string { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" }

cmd := &cobra.Command{
...
Expand Down

0 comments on commit d8184d3

Please sign in to comment.