k3s/pkg/kubectl/cmd
Kubernetes Submit Queue 7f9f847ce9
Merge pull request #54406 from superbrothers/kubectl-override-short-flags
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Improve 'kubectl completion` to override short flags

**What this PR does / why we need it**: This PR improves `kubectl completion` to override short flags in
addition to long flags. I tested this PR in both bash and zsh.

```
# Complete pods name in the `default` namespace
$ kubectl get po nginx-4217019353-<tab>
nginx-4217019353-mw1pk  nginx-4217019353-rzw2c

# Complete pods name in the `kube-system` namepace due to overriding the namespace
$ kubectl -n kube-system get po kube<tab>
kube-addon-manager-minikube  kube-dns-910330662-l9pwt     kubernetes-dashboard-9fbhm
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-31 22:32:54 -07:00
..
auth switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
config update BUILD files 2017-10-15 18:18:13 -07:00
resource Move printing the valid resource types to a function 2017-10-30 23:45:45 -04:00
rollout Switch to v1.List instead of allowing the conversion fn to be provided. 2017-10-18 09:30:46 -07:00
set fix issue(#52994)kubectl set resource can not update multi resource in local 2017-10-26 15:33:22 +08:00
templates update BUILD files 2017-10-15 18:18:13 -07:00
testdata/edit update BUILD files 2017-10-15 18:18:13 -07:00
testing Remove all traces of federation 2017-10-26 13:37:37 -07:00
util Merge pull request #54446 from smarterclayton/cleanup_get 2017-10-31 15:51:23 -07:00
BUILD Move printing the valid resource types to a function 2017-10-30 23:45:45 -04:00
alpha.go Implement `kubectl alpha diff` to diff resources 2017-10-23 10:49:02 -07:00
annotate.go Move printing the valid resource types to a function 2017-10-30 23:45:45 -04:00
annotate_test.go Merge pull request #54445 from crimsonfaith91/rem 2017-10-31 20:10:21 -07:00
apiversions.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
apply.go Merge pull request #54046 from hzxuzhonghu/kubectl-apply 2017-10-31 14:13:20 -07:00
apply_edit_last_applied.go enforce include-uninitialized in several kubectl commands 2017-08-31 16:30:56 +08:00
apply_set_last_applied.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
apply_test.go Merge pull request #54046 from hzxuzhonghu/kubectl-apply 2017-10-31 14:13:20 -07:00
apply_view_last_applied.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
attach.go Switch to v1.List instead of allowing the conversion fn to be provided. 2017-10-18 09:30:46 -07:00
attach_test.go [client-go] avoid Registry in fake REST client 2017-10-19 11:01:44 -04:00
autoscale.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
certificates.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
clusterinfo.go Better error check for kubectl cluster-info 2017-10-22 19:46:13 -04:00
clusterinfo_dump.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
clusterinfo_dump_test.go
cmd.go Merge pull request #54406 from superbrothers/kubectl-override-short-flags 2017-10-31 22:32:54 -07:00
cmd_test.go Move printing the valid resource types to a function 2017-10-30 23:45:45 -04:00
completion.go Update help/example for kubectl completion 2017-08-18 14:29:42 -07:00
convert.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
cp.go This patch improve kubectl cp command from two aspects 2017-10-13 13:51:53 +08:00
cp_test.go This patch improve kubectl cp command from two aspects 2017-10-13 13:51:53 +08:00
create.go add kubectl create --raw -f 2017-10-23 12:50:46 -04:00
create_clusterrole.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_clusterrole_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_clusterrolebinding.go Merge pull request #48267 from superbrothers/clusterrole-flag-completion 2017-10-03 22:04:00 -07:00
create_clusterrolebinding_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_configmap.go Add --append-hash flag to kubectl create configmap/secret 2017-08-28 14:17:47 -07:00
create_configmap_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_deployment.go Avoid fetching entire discovery tree when possible 2017-10-12 00:27:42 -04:00
create_deployment_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_namespace.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_namespace_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_pdb.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_pdb_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_quota.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_quota_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_role.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_role_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_rolebinding.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_rolebinding_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_secret.go update .dockercfg content to config.json 2017-10-18 14:33:14 -04:00
create_secret_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_service.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_service_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_serviceaccount.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
create_serviceaccount_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
create_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
delete.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
delete_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
describe.go Move printing the valid resource types to a function 2017-10-30 23:45:45 -04:00
describe_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
diff.go diff: Propragate errors when diffing 2017-10-30 14:16:36 -07:00
diff_test.go Implement `kubectl alpha diff` to diff resources 2017-10-23 10:49:02 -07:00
drain.go Update kubectl drain command to use policy V1Beta1 instead of unversioned API 2017-10-25 16:44:57 +02:00
drain_test.go remove created-by annotation 2017-10-30 12:49:44 -07:00
edit.go enforce include-uninitialized in several kubectl commands 2017-08-31 16:30:56 +08:00
edit_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
exec.go pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
exec_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
explain.go Move printing the valid resource types to a function 2017-10-30 23:45:45 -04:00
expose.go Merge pull request #47636 from xiangpengzhao/some-cleanup 2017-10-18 20:47:10 -07:00
expose_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
help.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
label.go Merge pull request #51971 from juanvallejo/jvallejo/add-list-option-to-kubectl-label 2017-09-23 18:49:00 -07:00
label_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
logs.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
logs_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
options.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
patch.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
patch_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
plugin.go exit with correct exit code on plugin failure 2017-10-18 19:01:29 -04:00
plugin_test.go
portforward.go Merge pull request #50229 from tcharding/kubectl-portforward 2017-08-23 03:36:03 -07:00
portforward_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
proxy.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
replace.go Remove swagger 1.2 validation 2017-10-03 08:18:21 -07:00
replace_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
rollingupdate.go Merge pull request #54024 from pwittrock/resource-validation-deps 2017-10-20 21:31:10 -07:00
rollingupdate_test.go
run.go Avoid fetching entire discovery tree when possible 2017-10-12 00:27:42 -04:00
run_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
scale.go Merge pull request #51021 from zjj2wry/scale-selector-all 2017-09-29 12:38:17 -07:00
taint.go add Local and Unstructured builder attributes 2017-09-05 11:57:00 -04:00
taint_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
top.go Merge pull request #50620 from juanvallejo/jvallejo/update-kubectl-top-validation 2017-08-21 08:26:23 -07:00
top_node.go pass labelSelector to server side opaquely 2017-09-30 14:54:27 +08:00
top_node_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
top_pod.go Merge pull request #50620 from juanvallejo/jvallejo/update-kubectl-top-validation 2017-08-21 08:26:23 -07:00
top_pod_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
top_test.go
version.go move i18n to kubectl/util 2017-08-16 12:27:36 -07:00