kubectl icon indicating copy to clipboard operation
kubectl copied to clipboard

Completion does not work for `create job --from`

Open alice-sawatzky opened this issue 2 years ago • 8 comments

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

alice-sawatzky avatar Mar 28 '23 19:03 alice-sawatzky

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.

k8s-ci-robot avatar Mar 28 '23 19:03 k8s-ci-robot

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

marckhouzam avatar Mar 29 '23 10:03 marckhouzam

Please assign the issue to me and I will try to solve it

Michael-Xing avatar Mar 30 '23 08:03 Michael-Xing

Hi @Michael-Xing you can assign issues using /assign

Ritikaa96 avatar Mar 31 '23 14:03 Ritikaa96

/assign

Michael-Xing avatar Apr 03 '23 12:04 Michael-Xing

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

k8s-triage-robot avatar Apr 02 '24 13:04 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Jul 01 '24 13:07 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Jul 31 '24 14:07 k8s-triage-robot