Zsh completion - #653
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #653 +/- ##
==========================================
- Coverage 80.99% 80.96% -0.03%
==========================================
Files 162 162
Lines 12113 12122 +9
==========================================
+ Hits 9810 9814 +4
- Misses 1806 1810 +4
- Partials 497 498 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
Pull request overview
Adds native zsh completion support to resticprofile and introduces integration testing to validate shell completion behavior across bash, zsh, and fish (including restic delegation), with a dedicated CI workflow to run these tests.
Changes:
- Replace the old zsh “bashcompinit translation” script with a native zsh completion implementation.
- Add shell completion integration tests (bash 4+, zsh, fish) and a
make test-completiontarget, plus a CI workflow to run them. - Update installation docs to reflect the new zsh completion loading/install paths.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Makefile | Adds test-completion target to run shell completion integration tests. |
| docs/content/installation/shell.md | Updates zsh completion loading/install instructions for the native script. |
| contrib/completion/zsh-completion.zsh | Adds a native zsh completion script (incl. restic delegation handling). |
| contrib/completion/zsh-completion.sh | Removes the legacy zsh script that relied on translating bash completion. |
| completion_shell_test.go | Adds integration tests that exercise generated completion scripts in real shells. |
| commands.go | Enables zsh completion requester support and adds optional debug logging for completion inputs/outputs. |
| commands_test.go | Updates unit tests to assert zsh completion requester returns expected completions. |
| commands_generate.go | Switches embedded zsh completion asset to the new .zsh script. |
| .github/workflows/completion.yml | Adds CI workflow to install shells/restic and run make test-completion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add native support for zsh completion (no need to use the translation script from bash completion)
Add integration tests for bash 4+, zsh and fish
Fixes #361 #403