Skip to content

feat: package shell completions into DEB, RPM, and APK#693

Open
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:fix/issue-345-package-shell-completions
Open

feat: package shell completions into DEB, RPM, and APK#693
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:fix/issue-345-package-shell-completions

Conversation

@ivanauth
Copy link
Copy Markdown
Contributor

@ivanauth ivanauth commented May 22, 2026

Adds a Gen.Completions mage target that generates bash/zsh/fish completion scripts via Cobra's built-in generators, and wires goreleaser to produce them before each build and install them into the standard system paths for DEB, RPM, and APK packages.

Fixes #345

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.77%. Comparing base (b0cdc17) to head (af019b4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #693   +/-   ##
=======================================
  Coverage   43.77%   43.77%           
=======================================
  Files          38       38           
  Lines        6193     6193           
=======================================
  Hits         2711     2711           
  Misses       3201     3201           
  Partials      281      281           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread magefiles/gen.go
return err
}

rootCmd := cmd.InitialiseRootCmd(cobrazerolog.New())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling that this is more brittle than reconfiguring goreleaser to run this in a pre-publish hook:

zed completion bash > ./completions/zed.bash
zed completion zsh > ./completions/zed.zsh
zed completion fish > ./completions/zed.fish

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.

Package shell completion into DEB and RPM

3 participants