Commit f2ca99ed authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #32104 from lojies/usededentforcompletion

Automatic merge from submit-queue Use dedent for completion.go
parents f15c12c3 b118db0a
......@@ -20,33 +20,36 @@ import (
"bytes"
"io"
"github.com/renstrom/dedent"
"github.com/spf13/cobra"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
)
const (
completion_long = `Output shell completion code for the given shell (bash or zsh).
var (
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
completion of kubectl commands.
`
completion_example = `
$ source <(kubectl completion bash)
This command prints shell code which must be evaluation to provide interactive
completion of kubectl commands.
`)
completion_example = dedent.Dedent(`
$ source <(kubectl completion bash)
will load the kubectl completion code for bash. Note that this depends on the
bash-completion framework. It must be sourced before sourcing the kubectl
completion, e.g. on the Mac:
will load the kubectl completion code for bash. Note that this depends on the
bash-completion framework. It must be sourced before sourcing the kubectl
completion, e.g. on the Mac:
$ brew install bash-completion
$ source $(brew --prefix)/etc/bash_completion
$ source <(kubectl completion bash)
$ brew install bash-completion
$ source $(brew --prefix)/etc/bash_completion
$ source <(kubectl completion bash)
If you use zsh*, the following will load kubectl zsh completion:
If you use zsh*, the following will load kubectl zsh completion:
$ source <(kubectl completion zsh)
$ source <(kubectl completion zsh)
* zsh completions are only supported in versions of zsh >= 5.2`
* zsh completions are only supported in versions of zsh >= 5.2`)
)
var (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment