Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubectl bash Autocomplete is broken with latest bash-completion version #1695

Open
abhijit-dev82 opened this issue Jan 3, 2025 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@abhijit-dev82
Copy link

What happened:
kubectl autocomplete is broken with the below error
"bash: _get_comp_words_by_ref: command not found"
with 2.14 Bash-completion version. From the bash-completion docs "_get_comp_words_by_ref" seems to be a deprecated API.

What you expected to happen:
Bash Autocomplete to work as for older versions.

How to reproduce it (as minimally and precisely as possible):
Install latest "bash-completion" package and try out "kubectl" autocomplete.

Anything else we need to know?:

Environment:

  • Kubernetes client and server versions (use kubectl version):
    Client Version: v1.30.5+vmware.3-fips
    Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
    Server Version: v1.30.5+vmware.3-fips
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release): Photon 5
@abhijit-dev82 abhijit-dev82 added the kind/bug Categorizes issue or PR as related to a bug. label Jan 3, 2025
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jan 3, 2025
@k8s-ci-robot
Copy link
Contributor

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-sigs/prow repository.

@ardaguclu
Copy link
Member

kubectl relies on spf13/cobra with regards to bash completion and as far as I can see, this function is only being used in here https://github.com/spf13/cobra/blob/main/bash_completionsV2.go#L51
I'd recommend opening an issue in https://github.com/spf13/cobra to be triaged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants