Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f2ca99ed
Commit
f2ca99ed
authored
Oct 13, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Oct 13, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #32104 from lojies/usededentforcompletion
Automatic merge from submit-queue Use dedent for completion.go
parents
f15c12c3
b118db0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
completion.go
pkg/kubectl/cmd/completion.go
+19
-16
No files found.
pkg/kubectl/cmd/completion.go
View file @
f2ca99ed
...
@@ -20,33 +20,36 @@ import (
...
@@ -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)
completion_example
=
dedent
.
Dedent
(
`
$ source <(kubectl completion bash)
will load the kubectl completion code for bash. Note that this depends on the
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
bash-completion framework. It must be sourced before sourcing the kubectl
completion, e.g. on the Mac:
completion, e.g. on the Mac:
$ brew install bash-completion
$ brew install bash-completion
$ source $(brew --prefix)/etc/bash_completion
$ source $(brew --prefix)/etc/bash_completion
$ source <(kubectl completion bash)
$ 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
(
var
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment