Skip to content

feat: ship shell completions in release archives and Homebrew cask - #89

Open
displague wants to merge 1 commit into
mainfrom
feat/cask-completions
Open

displague wants to merge 1 commit into
mainfrom
feat/cask-completions

Conversation

@displague

Copy link
Copy Markdown
Member

Summary

  • Generate bash, zsh, and fish completions (equinix completion <shell>) in a goreleaser before hook, written to completions/
  • Include completions/* in the release zip archives
  • Install them through the homebrew_casks.completions option
  • Ignore the generated completions/ directory

Testing

  • Ran the hook command locally; it produced all three completion files
  • equinix completion <shell> works with no config file and no home directory
  • Not run: goreleaser check / snapshot release (couldn't install GoReleaser locally). After the next release, confirm Casks/equinix.rb in equinix/homebrew-tap has bash_completion, zsh_completion, and fish_completion lines

References

🤖 Generated with Claude Code

Generate bash, zsh, and fish completions in a goreleaser before hook,
include them in the release archives, and install them via the
homebrew_casks completions option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@displague

Copy link
Copy Markdown
Member Author

Follow-up ideas, out of scope for this PR:

  • Linux packages (.deb / .rpm / .apk) via GoReleaser nfpms: would get the most out of this. The generated completions/ files can be installed into the standard system completion directories (/usr/share/bash-completion/completions/, /usr/share/zsh/vendor-completions/, /usr/share/fish/vendor_completions.d/). The build already targets Linux, so it's mostly config.
  • AUR (Arch Linux) via GoReleaser aurs: also supports shipping completion files.
  • Scoop / winget (Windows): no real benefit. Neither has a standard place for completions, and PowerShell users load them from their profile with equinix completion powershell.
  • go install: can't install completions.
  • README: the Homebrew section could say that completions are now installed automatically.

🤖 Generated with Claude Code

@displague

displague commented Nov 18, 2026 •

Copy link
Copy Markdown
Member Author

When I started this prompt, I was hoping that cobra would have support for a pattern I've seen in other tool's completion arg -- --install. spf13/cobra#2579

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.

1 participant