Skip to content
Myr

Fix typo sh completion docs (#1678)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Nguyen · committed by GitHub · parent b9460cc · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:shell_completions.md+2 added-2 removed
120 unmodified lines
121For example, if you want `kubectl get [tab][tab]` to show a list of valid "nouns" you have to set them.122Some simplified code from `kubectl get` looks like:123124```go125validArgs []string = { "pod", "node", "service", "replicationcontroller" }125validArgs = []string{ "pod", "node", "service", "replicationcontroller" }126127cmd := &cobra.Command{128 Use: "get [(-o|--output=)json|yaml|template|...] (RESOURCE [NAME] | RESOURCE/NAME ...)",129 Short: "Display one or many resources",
17 unmodified lines
147148If your nouns have aliases, you can define them alongside `ValidArgs` using `ArgAliases`:149150```go151argAliases []string = { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" }151argAliases = []string { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" }152153cmd := &cobra.Command{154 ...155 ValidArgs: validArgs,
393 unmodified lines