Skip to content

Enable Bash completions for formulae using :click #229665

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

Closed
wants to merge 91 commits into from

Conversation

StenAL
Copy link
Contributor

@StenAL StenAL commented Jul 10, 2025

Description

Click can generate completions for Bash versions newer than 4.4. Bash was previously excluded from the completions list because even generating the completions needed a new version of Bash. This is no longer the case meaning the completions can always be generated, even if the system is using an old version of Bash (e.g. macOS's built-in Bash running v3.2.57).

Changes generated by running:

grep ":click" -R -l Formula/ | xargs -I {} sed -i 's/\(shells: \[\)/\1:bash, /g' {}

And manually fixing up any formulae that used multi-line generate_completions_from_executable calls.

Fixes Homebrew/brew#20188

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@github-actions github-actions bot added automerge-skip `brew pr-automerge` will skip this pull request python Python use is a significant feature of the PR or issue labels Jul 10, 2025
Copy link
Contributor

Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.

@StenAL StenAL force-pushed the bash-click-completions branch from f19a771 to a077bfa Compare July 10, 2025 16:21
@github-actions github-actions bot removed the automerge-skip `brew pr-automerge` will skip this pull request label Jul 10, 2025
@MikeMcQuaid MikeMcQuaid added CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. CI-skip-dependents Pass --skip-dependents to brew test-bot. long build Set a long timeout for formula testing CI-skip-livecheck Pass --skip-livecheck to brew test-bot. CI-skip-revision-audit Pass --skip-revision-audit to brew test-bot. CI-skip-new-formulae Pass --skip-new to brew test-bot. CI-skip-new-formulae-strict Pass --skip-new-strictw to brew test-bot. labels Jul 11, 2025
@MikeMcQuaid
Copy link
Member

@StenAL restarted the build in a way that should decrease chances of timeout. If it still times out (or if any formulae fail): please extract failing formulae/some formulae into separate PRs.

@p-linnane
Copy link
Member

Thanks for your contributions @StenAL! I've approved most of the PR's. Users will need to brew reinstall to get the new completions until there's new versions of the packages released.

@p-linnane p-linnane closed this Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-dependents Pass --skip-dependents to brew test-bot. CI-skip-livecheck Pass --skip-livecheck to brew test-bot. CI-skip-new-formulae Pass --skip-new to brew test-bot. CI-skip-new-formulae-strict Pass --skip-new-strictw to brew test-bot. CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. CI-skip-revision-audit Pass --skip-revision-audit to brew test-bot. long build Set a long timeout for formula testing python Python use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should :click shell completions be enabled for Bash?
3 participants