Skip to content

Add shell completion support for bash and zsh#143

Merged
lex57ukr merged 2 commits intomainfrom
115-add-shell-completion-support
Feb 5, 2026
Merged

Add shell completion support for bash and zsh#143
lex57ukr merged 2 commits intomainfrom
115-add-shell-completion-support

Conversation

@lex57ukr
Copy link
Contributor

@lex57ukr lex57ukr commented Feb 5, 2026

Summary

Enable tab completion for keystone-cli commands and options in bash and zsh shells. Package managers (Homebrew, apt) install completions automatically, while tarball users can use eval "$(keystone-cli --completion bash)" in their shell config.

Related Issues

Fixes #115

Changes

  • Enable Cocona's shell completion support in Program.cs
  • Add generate-completions.sh script for CI to produce completion scripts
  • Update release workflow to generate and distribute completion scripts
  • Include completions in tarballs and .deb packages at standard system paths
  • Document shell completion setup in man page, README, and CLAUDE.md

Enable Cocona's shell completion feature and package pre-generated
scripts so completions work out of the box for .deb and Homebrew users.
Tarball users can use the --completion flag manually.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lex57ukr lex57ukr added the enhancement New feature or request label Feb 5, 2026
Copilot AI review requested due to automatic review settings February 5, 2026 02:20
@lex57ukr lex57ukr added the enhancement New feature or request label Feb 5, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds shell completion support for bash and zsh to keystone-cli, enabling tab completion for commands and options. Completions are automatically installed by package managers (Homebrew, apt), while manual installation users can enable completions using eval "$(keystone-cli --completion bash)".

Changes:

  • Enabled Cocona's shell completion feature in the CLI application
  • Added automation to generate and distribute completion scripts in releases
  • Updated documentation to explain completion setup for different installation methods

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Keystone.Cli/Program.cs Enabled shell completion support in Cocona configuration
scripts/generate-completions.sh New script to generate bash and zsh completion files from the binary
scripts/package-release.sh Updated to include completion scripts in release tarballs
scripts/verify-deb-install.sh Added verification checks for installed completion files
nfpm.yaml Configured .deb package to install completions to system paths
.github/workflows/release.yml Added workflow steps to generate and distribute completion scripts
docs/man/man1/keystone-cli.1 Documented the --completion flag and usage examples
README.md Added shell completion installation instructions
CLAUDE.md Documented completion implementation details and local testing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The nfpm.yaml references completion files, so the build-deb action
must ensure they exist before packaging. Skips generation if scripts
already exist (e.g., pre-generated in release workflow).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lex57ukr lex57ukr merged commit d592512 into main Feb 5, 2026
9 checks passed
@lex57ukr lex57ukr deleted the 115-add-shell-completion-support branch February 5, 2026 02:34
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.

Add shell completion support for bash and zsh

1 participant