feat(release): install shell completions on brew install (DX-5783)#39
Merged
johnpmitsch merged 2 commits intoJun 17, 2026
Merged
Conversation
The cargo-dist-generated homebrew formula installs the binary but not shell completions, so brew users got no tab-completion out of the box. The formula is generated upstream and copied verbatim into the tap each release, so it can't be hand-edited durably; cargo-dist's template also dumps any bundled files into pkgshare, where shells don't read them. Patch the generated formula in release-update-homebrew-tap to run `qn completions <shell>` at install time via generate_completions_from_executable. `qn completions` is a pure local generator (no key, no network), so it's safe during brew install. The patch is idempotent and hard-fails if cargo-dist's install_binary_aliases! anchor disappears, so a template change can't silently drop completions.
AlejandroFabianCampos
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
brew install quicknode/tap/qninstalled the binary but no shell completions, so brew users got no tab-completion out of the box.qn completions <shell>already generates working bash/zsh/fish completions (pure local generator — no key, no network), but the formula never invoked it.The formula is generated by cargo-dist and copied verbatim into
quicknode/homebrew-tapeach release, so it can't be hand-edited durably; cargo-dist's template also dumps any bundled files intopkgshare, where shells don't read them. So this patches the generated formula in therelease-update-homebrew-taprecipe (the one place that owns formula → tap), insertinggenerate_completions_from_executable(bin/"qn", "completions")after the binary install. Atbrew installtime that runsqn completions bash|zsh|fishand drops each in the right dir.The patch is idempotent (skips if already present) and fails loud if cargo-dist's
install_binary_aliases!anchor disappears, so a future template change can't silently drop completions from a release.This is Justfile-only — no
src/change.Test plan
Verified the patch logic against the live
Formula/qn.rbwithout doing a release:def installright afterinstall_binary_aliases!;ruby -con the result → Syntax OK..tmp) untouched.def install_binary_aliases!definition.justparses the recipe;cargo fmt --checkclean.Post-merge, the next release's formula will carry the completion line; a fresh
brew install/upgradethen yieldsqn <TAB>completion in zsh/bash/fish.Closes DX-5783