Commit Graph

21 Commits

Author SHA1 Message Date
Kubernetes Submit Queue
19d722671b Merge pull request #43297 from mvdan/kubectl-params
Automatic merge from submit-queue

kubectl/cmd: remove a bunch of unused parameters

Found with github.com/mvdan/unparam.

**Release note**: NONE
2017-04-13 04:07:21 -07:00
Brendan Burns
79f51923d3 Extract a bunch more strings from kubectl 2017-04-06 20:12:50 -07:00
Daniel Martí
810dbc5e98 kubectl/cmd: remove a bunch of unused parameters
Found with github.com/mvdan/unparam.
2017-04-04 10:36:30 +01:00
elipapa
136c90a7bf solving unknown file attribute error while sourcing completions
sourcing the file with `zsh` > 4 resulted in an `unknown file attribute`.
More details at http://stackoverflow.com/questions/37220495/zsh-unknown-file-attribute

replacing $@ with $* for get_comp_words
as suggested by @sttts worked to resolve the issue
2017-02-24 16:29:41 +00:00
Brendan Burns
d9c4a289a6 Extract strings for translation. 2017-02-06 22:32:01 -08:00
Maciej Szulik
56147c5174 Allow setting copyright header file for generated completions 2017-01-19 16:06:20 +01:00
Phillip Wittrock
dc2fffe5d4 Improve kubectl help with examples. 2017-01-06 13:35:43 -08:00
Kubernetes Submit Queue
2a89179046 Merge pull request #39070 from shiywang/remove_unused_param
Automatic merge from submit-queue (batch tested with PRs 39022, 39331, 39070, 39344)

remove unused parameter
2017-01-03 10:32:22 -08:00
Shiyang Wang
9d037a0ab6 remove unused parameter 2016-12-21 16:09:51 +08:00
Matt Rickard
0497ffb9c6 Add boilerplate to kubectl completion bash
Small refactor to make kubectl bash and zsh completion share
boilerplate.  Previously the boilerplate was not included in the bash
script.
2016-10-21 14:07:38 -07:00
Fabiano Franz
f6d1ac72a0 Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
Kubernetes Submit Queue
786cc3ef6c Merge pull request #32142 from juanvallejo/jvallejo_bugfix/remove-compinit-call-zsh-completions
Automatic merge from submit-queue

remove call to compinit in zsh completion output

**Release note**:
```release-note
release-note-none
```

Fixes: https://github.com/kubernetes/kubernetes/issues/32029
Fixes:
https://github.com/kubernetes/kubernetes/issues/27538#issuecomment-238574035

The zsh completion output makes a call to "compinit" which causes the
zsh completion system to re-initialize every time `<root_cmd> completion zsh`
is sourced, overwriting any settings already applied to other commands.
This in-turn caused other commands' completions to break (such as git,
gcloud, vim) causing an error "function definition file not found" to
be returned any time a tab-completion was attempted.

This patch removes the call to `compinit` in the zsh completion output,
causing no behavioral changes to the existing `completion` command, but
fixing any issues that were caused after sourcing its output.
2016-10-13 16:33:09 -07:00
juanvallejo
4bf980967a remove call to compinit in zsh completion output
Fixes: https://github.com/kubernetes/kubernetes/issues/32029
Fixes:
https://github.com/kubernetes/kubernetes/issues/27538#issuecomment-238574035

The zsh completion output makes a call to "compinit" which causes the
zsh completion system to re-initialize every time `<root_cmd> completion zsh`
is sourced, overwriting any settings already applied to other commands.
This in-turn caused other commands' completions to break (such as git,
gcloud, vim) causing an error "function definition file not found" to
be returned any time a tab-completion was attempted.

This patch removes the call to `compinit` in the zsh completion output,
causing no behavioral changes to the existing `completion` command, but
fixing any issues that were caused after sourcing its output.
2016-10-13 16:47:20 -04:00
Kubernetes Submit Queue
f2ca99ed2c Merge pull request #32104 from lojies/usededentforcompletion
Automatic merge from submit-queue

Use dedent for completion.go
2016-10-13 10:07:54 -07:00
AdoHe
b2280a646a update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
lojies
b118db0a17 Use dedent for completion.go 2016-09-06 15:49:20 +08:00
ohmystack
1ea3da1eb6 Fix named pipe in kubectl zsh completion
In zsh and bash, a multi-line named pipe, who is wrapped by
parenthesis, is possible to mismatch the right parenthesis, even that
parenthesis is in a here-document. So, we move the code into a
function, and use an inline named pipe.

Signed-off-by: ohmystack <jiangjun1990@gmail.com>
2016-08-23 01:42:05 +08:00
juanvallejo
9eb98cfb58 Add zsh compatibility note completion cmd help 2016-08-11 13:49:44 -04:00
Eli Young
f2f80a097d Reformat kubectl completion example text
This makes the description wrap properly in 80-character terminals.
2016-07-06 13:18:33 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Dr. Stefan Schimanski
a79a420fde Move shell completion generation into 'kubectl completion' command 2016-05-30 07:23:36 +02:00