mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Update shell_completions.md (#1907)
align documentation with the code : completions.go:452
This commit is contained in:
parent
8b8ee8754c
commit
87ebcd8f98
1 changed files with 1 additions and 10 deletions
|
@ -162,16 +162,7 @@ cmd := &cobra.Command{
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The aliases are not shown to the user on tab completion, but they are accepted as valid nouns by
|
The aliases are shown to the user on tab completion only if no completions were found within sub-commands or `ValidArgs`.
|
||||||
the completion algorithm if entered manually, e.g. in:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ kubectl get rc [tab][tab]
|
|
||||||
backend frontend database
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that without declaring `rc` as an alias, the completion algorithm would not know to show the list of
|
|
||||||
replication controllers following `rc`.
|
|
||||||
|
|
||||||
### Dynamic completion of nouns
|
### Dynamic completion of nouns
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue