mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
Merge pull request #32104 from lojies/usededentforcompletion
Automatic merge from submit-queue Use dedent for completion.go
This commit is contained in:
commit
f2ca99ed2c
@ -20,33 +20,36 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
|
"github.com/renstrom/dedent"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
var (
|
||||||
completion_long = `Output shell completion code for the given shell (bash or zsh).
|
completion_long = dedent.Dedent(`
|
||||||
|
Output shell completion code for the given shell (bash or zsh).
|
||||||
|
|
||||||
This command prints shell code which must be evaluation to provide interactive
|
This command prints shell code which must be evaluation to provide interactive
|
||||||
completion of kubectl commands.
|
completion of kubectl commands.
|
||||||
`
|
`)
|
||||||
completion_example = `
|
|
||||||
$ source <(kubectl completion bash)
|
|
||||||
|
|
||||||
will load the kubectl completion code for bash. Note that this depends on the
|
completion_example = dedent.Dedent(`
|
||||||
bash-completion framework. It must be sourced before sourcing the kubectl
|
$ source <(kubectl completion bash)
|
||||||
completion, e.g. on the Mac:
|
|
||||||
|
|
||||||
$ brew install bash-completion
|
will load the kubectl completion code for bash. Note that this depends on the
|
||||||
$ source $(brew --prefix)/etc/bash_completion
|
bash-completion framework. It must be sourced before sourcing the kubectl
|
||||||
$ source <(kubectl completion bash)
|
completion, e.g. on the Mac:
|
||||||
|
|
||||||
If you use zsh*, the following will load kubectl zsh completion:
|
$ brew install bash-completion
|
||||||
|
$ source $(brew --prefix)/etc/bash_completion
|
||||||
|
$ source <(kubectl completion bash)
|
||||||
|
|
||||||
$ source <(kubectl completion zsh)
|
If you use zsh*, the following will load kubectl zsh completion:
|
||||||
|
|
||||||
* zsh completions are only supported in versions of zsh >= 5.2`
|
$ source <(kubectl completion zsh)
|
||||||
|
|
||||||
|
* zsh completions are only supported in versions of zsh >= 5.2`)
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user