You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend Go completions and revamp zsh comp (#1070) (#1070)
Replace the current Zsh completion with a Zsh completion solution based
on Go completions. This allows to support custom completions (based
on Go completions), but also to standardize the behavior of completion
across all shells.
Also, add support to Go completions for the bash completion annotations:
BashCompFilenameExt (including Command.MarkFlagFilename() family)
- still supported by zsh
BashCompSubdirsInDir - now supported by zsh
BashCompOneRequiredFlag (including Command.MarkFlagRequired() family)
- now supported by zsh and fish
Finally, remove the suggestin of the = form of flag completion.
The = form is supported, but it will not be suggested to avoid having
duplicated suggestions.
* Intelligent suggestions (`app srver`... did you mean `app server`?)
51
50
* Automatic help generation for commands and flags
52
51
* Automatic help flag recognition of `-h`, `--help`, etc.
53
-
* Automatically generated bash autocomplete for your application
52
+
* Automatically generated shell autocomplete for your application (bash, zsh, fish, powershell)
54
53
* Automatically generated man pages for your application
55
54
* Command aliases so you can change things without breaking them
56
55
* The flexibility to define your own help, usage, etc.
@@ -720,14 +719,9 @@ Run 'kubectl help' for usage.
720
719
721
720
Cobra can generate documentation based on subcommands, flags, etc. Read more about it in the [docs generation documentation](doc/README.md).
722
721
723
-
## Generating bash completions
722
+
## Generating shell completions
724
723
725
-
Cobra can generate a bash-completion file. If you add more information to your command, these completions can be amazingly powerful and flexible. Read more about it in [Bash Completions](bash_completions.md).
726
-
727
-
## Generating zsh completions
728
-
729
-
Cobra can generate zsh-completion file. Read more about it in
730
-
[Zsh Completions](zsh_completions.md).
724
+
Cobra can generate a shell-completion file for the following shells: Bash, Zsh, Fish, Powershell. If you add more information to your commands, these completions can be amazingly powerful and flexible. Read more about it in [Shell Completions](shell_completions.md).
0 commit comments