Skip to content

Zsh completion - #653

Merged
creativeprojects merged 7 commits into
masterfrom
zsh-completion
Jun 25, 2026
Merged

Zsh completion#653
creativeprojects merged 7 commits into
masterfrom
zsh-completion

Conversation

@creativeprojects

@creativeprojects creativeprojects commented Jun 25, 2026

Copy link
Copy Markdown
Owner

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

Copilot AI review requested due to automatic review settings June 25, 2026 18:27
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.96%. Comparing base (67b37a9) to head (3ea571f).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
commands.go 50.00% 4 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
unittests 79.24% <50.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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-completion target, 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.

Comment thread completion_shell_test.go
Comment thread completion_shell_test.go Outdated
@creativeprojects creativeprojects added the enhancement New feature or request label Jun 25, 2026
@creativeprojects creativeprojects added this to the v0.34.0 milestone Jun 25, 2026
@creativeprojects
creativeprojects merged commit 9b8fbfc into master Jun 25, 2026
13 of 14 checks passed
@creativeprojects
creativeprojects deleted the zsh-completion branch June 25, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve zsh shell completion

2 participants