Skip to content

fix: zsh completions for old cask names #20180

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tiluckdave
Copy link

@tiluckdave tiluckdave commented Jun 26, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Fixes #20056

Made a new file in the cache_dir containing old cask names as well, so as not to disturb the brew casks command. Updated the completions logic to take it from the new file if it exists, or else defaults to brew casks.

@MikeMcQuaid
Copy link
Member

Thanks for the PR @tiluckdave!

@Homebrew/maintainers interested in thoughts on this. I'd rather we didn't write another file here but I don't think it makes for brew casks (or even completions, honestly) to handle the old names. Thoughts?

@EricFromCanada
Copy link
Member

If such a feature is to be added, it should be done for bash/fish/zsh and for both formulae and casks. Also, instead of generating a new file with cask's current and old names mixed together, why not implement something similar to how formula_aliases.txt is generated and read? Also, is it possible for tab completion to auto-correct to the new name when completing the old name?

@tiluckdave
Copy link
Author

@EricFromCanada @MikeMcQuaid

I can update this for formulae as well as on bash/zsh/fish. But first, let me explore whether we can autocomplete to a new name. If I find something, I will share my approach here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zsh completions don't work for former token
3 participants