mirror of https://github.com/knative/client.git
parent
d66887a310
commit
c4a919718d
|
|
@ -22,6 +22,7 @@ Manage your Knative building blocks:
|
||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
|
* [kn completion](kn_completion.md) - Output shell completion code
|
||||||
* [kn plugin](kn_plugin.md) - Plugin command group
|
* [kn plugin](kn_plugin.md) - Plugin command group
|
||||||
* [kn revision](kn_revision.md) - Revision command group
|
* [kn revision](kn_revision.md) - Revision command group
|
||||||
* [kn route](kn_route.md) - Route command group
|
* [kn route](kn_route.md) - Route command group
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
## kn completion
|
||||||
|
|
||||||
|
Output shell completion code
|
||||||
|
|
||||||
|
### Synopsis
|
||||||
|
|
||||||
|
|
||||||
|
This command prints shell completion code which needs to be evaluated
|
||||||
|
to provide interactive completion
|
||||||
|
|
||||||
|
Supported Shells:
|
||||||
|
- bash
|
||||||
|
- zsh
|
||||||
|
|
||||||
|
```
|
||||||
|
kn completion [SHELL] [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
# Generate completion code for bash
|
||||||
|
source <(kn completion bash)
|
||||||
|
|
||||||
|
# Generate completion code for zsh
|
||||||
|
source <(kn completion zsh)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
```
|
||||||
|
-h, --help help for completion
|
||||||
|
```
|
||||||
|
|
||||||
|
### Options inherited from parent commands
|
||||||
|
|
||||||
|
```
|
||||||
|
--config string kn config file (default is $HOME/.kn/config.yaml)
|
||||||
|
--kubeconfig string kubectl config file (default is $HOME/.kube/config)
|
||||||
|
--log-http log http traffic
|
||||||
|
```
|
||||||
|
|
||||||
|
### SEE ALSO
|
||||||
|
|
||||||
|
* [kn](kn.md) - Knative client
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
desc = `
|
desc = `
|
||||||
This command prints shell completion code which need to be evaluated
|
This command prints shell completion code which needs to be evaluated
|
||||||
to provide interactive completion
|
to provide interactive completion
|
||||||
|
|
||||||
Supported Shells:
|
Supported Shells:
|
||||||
|
|
@ -47,7 +47,6 @@ func NewCompletionCommand(p *commands.KnParams) *cobra.Command {
|
||||||
Long: desc,
|
Long: desc,
|
||||||
ValidArgs: []string{"bash", "zsh"},
|
ValidArgs: []string{"bash", "zsh"},
|
||||||
Example: eg,
|
Example: eg,
|
||||||
Hidden: true, // Don't show this in help listing
|
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
if len(args) == 1 {
|
if len(args) == 1 {
|
||||||
switch args[0] {
|
switch args[0] {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue