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

bazel-complete.bash doesnt do tab completion on bash 4.4.20(1)-release #22402

Open
shantanu-gontia opened this issue May 16, 2024 · 1 comment
Labels
help wanted Someone outside the Bazel team could own this P3 We're not considering working on this, but happy to review a PR. (No assignee) team-CLI Console UI type: bug

Comments

@shantanu-gontia
Copy link

Description of the bug:

The Bazel completion plugin for Bash downloaded with bazel doesn't work for me. I'm using Bash 4.4.20(1)-release
I'm not sure if this fails to run on newer versions, I haven't tested this yet.

I'm not too familiar with bash scripting, so I don't know if this is invalid syntax or perhaps some error in parsing the file with the bash version I'm on.

Which category does this issue belong to?

CLI

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  • Install bash-4.4.20(1)
  • Install Bazel 6.4.20
  • Create a Bazel Repo
  • Try autocomplete

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

release 6.4.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

After some fiddling, what worked for me was removing the comments after every condition in the case...easc blocks

For instance, removing the comments of the form

*) # Expand target pattern

i.e. comments following one of the case matches in the same line.

@fmeum
Copy link
Collaborator

fmeum commented May 16, 2024

As this is tricky to reproduce, would you be interested in submitting a PR with the fixes required to get it to work on your machine?

@zhengwei143 zhengwei143 added P3 We're not considering working on this, but happy to review a PR. (No assignee) help wanted Someone outside the Bazel team could own this and removed untriaged labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Someone outside the Bazel team could own this P3 We're not considering working on this, but happy to review a PR. (No assignee) team-CLI Console UI type: bug
Projects
None yet
Development

No branches or pull requests

6 participants