kubectl/pkg
Marc Khouzam b111bee570 Complete multiple resource names
This commit teaches the completion function to repeat resource names
when supported by the command. The logic checks if a resource name
has already been specified by the user and does not include it again
when repeating the completion.

For example, the get command can receive multiple pods names, therefore
with this commit we have:
  kubectl get pod pod1 [tab]
will provide completion of pod names again, but not show 'pod1' since
it is already part of the command-line.

The improvement affects the following commands:
- annotate
- apply edit-last-applied
- apply view-last-applied
- autoscale
- delete
- describe
- edit
- expose
- get
- label
- patch
- rollout history
- rollout pause
- rollout restart
- rollout resume
- rollout undo
- scale
- taint

Note that "rollout status" only accepts a single resource name, unlike
the other "rollout ..." commands; this required the creation of a
special completion function that did not repeat just for that case.

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>

Kubernetes-commit: 7aa5cb40316dbeb970250ee0835fbd597fd19a20
2021-10-15 15:36:09 -04:00
..
apply Rename test/data directory to testdata 2019-10-31 13:40:02 -07:00
apps Move pkg/kubectl/apps to staging 2019-07-24 20:02:05 -07:00
cmd Complete multiple resource names 2021-10-15 15:36:09 -04:00
describe kubectl: Use fields from event series when computing describe events for a object (#104482) 2021-09-14 00:18:50 +00:00
drain [k8s.io/kubectl/pkg/drain/drain]: minor typo fixup 2021-08-01 07:07:31 +08:00
explain clean true judge 2021-04-27 20:11:36 +08:00
generate Clean unused generators 2021-03-03 22:47:53 +01:00
metricsutil fix top node output format incorrect 2021-09-18 09:41:51 +08:00
polymorphichelpers Fix the code is leaking the defaulting between unrelated pod instances 2021-07-09 09:57:05 +08:00
proxy kubectl proxy: append context host path to request path 2020-12-16 17:37:44 +01:00
rawhttp Close the used file 2021-06-03 15:36:20 +08:00
scale Support kubectl scale --dry-run=server|client 2020-03-30 17:33:15 -04:00
scheme Promote cronjob to batch/v1: kubectl sparse_test prune 2021-05-26 20:08:36 +08:00
util Complete multiple resource names 2021-10-15 15:36:09 -04:00
validation Move pkg/kubectl/validation to staging 2019-06-26 12:56:28 -07:00