Skip to content

fix: zsh completions for old cask names#20180

Closed
tiluckdave wants to merge 1 commit intoHomebrew:mainfrom
tiluckdave:zsh-completions-for-old-cask-names
Closed

fix: zsh completions for old cask names#20180
tiluckdave wants to merge 1 commit intoHomebrew:mainfrom
tiluckdave:zsh-completions-for-old-cask-names

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.

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Jul 19, 2025
@github-actions github-actions bot closed this Jul 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale No recent activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zsh completions don't work for former token

3 participants