kubectl
kubectl copied to clipboard
Completion does not work for `create job --from`
What would you like to be added:
Completion currently does not work at all after a --from flag. Immediately after the flag, it only suggests filenames (which is incorrect), and not resource types. After a resource type and a slash, it doesn't suggest anything (instead of the expected behavior of suggesting resource names)
Why is this needed:
create --from is used to manually trigger CronJobs, I'm not aware of other use cases but I'm sure they exist. It's a bit of a pain to have to do an extra kubectl get to get the exact name and then copy/paste or type it out, when tab completion usually enables a much faster flow
This issue is currently awaiting triage.
SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.
The triage/accepted label can be added by org members by writing /triage accepted in a comment.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Thanks @alice-sawatzky . This would be a simple thing to add if you want to give it a try.
Here is an example of adding completion to a flag: https://github.com/kubernetes/kubectl/blob/65639830b2b0e5f6b254d05b911b7676eb7757d2/pkg/cmd/create/create_clusterrolebinding.go#L107-L112
Please assign the issue to me and I will try to solve it
Hi @Michael-Xing you can assign issues using
/assign
/assign
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
- Confirm that this issue is still relevant with
/triage accepted(org members only) - Close this issue with
/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten