Skip to content

feat: add terminal completion support#7

Merged
fredvisser merged 2 commits intomainfrom
users/fvisser/add-completion-scripts
Jul 28, 2025
Merged

feat: add terminal completion support#7
fredvisser merged 2 commits intomainfrom
users/fvisser/add-completion-scripts

Conversation

@fredvisser
Copy link
Copy Markdown
Collaborator

Adds comprehensive shell completion functionality to SystemLink CLI with support for bash, zsh, fish, and PowerShell.

Changes:

  • New module: completion_click.py - Complete shell completion system (352 lines)
  • Multi-shell support: Native completion for bash, zsh, fish, and PowerShell with auto-detection
  • Installation script: install_completion.py - Standalone completion installer (191 lines)
  • PowerShell support: Custom completion script with intelligent command/option completion
  • Comprehensive docs: shell-completion.md - Installation guide and troubleshooting (187 lines)
  • CLI integration: New slcli completion command with --install and --shell options
  • Documentation: Updated README with completion examples and quick setup

Key Features:

  • Auto-detects current shell (SHELL env var, Windows detection)
  • Completes commands, subcommands, options, and option values
  • Cross-platform installation (Windows, macOS, Linux)
  • Handles permission errors gracefully with fallback directories
  • Consistent with existing CLI patterns and coding standards

@fredvisser fredvisser requested a review from Copilot July 28, 2025 17:37
Copy link
Copy Markdown

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 comprehensive shell completion functionality to SystemLink CLI, supporting bash, zsh, fish, and PowerShell shells with auto-detection capabilities.

Key changes:

  • Implements a complete shell completion system with multi-shell support and automatic installation
  • Adds comprehensive documentation and installation scripts for easy setup
  • Integrates completion commands into the main CLI interface

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
slcli/main.py Registers the new completion command with the main CLI
slcli/completion_click.py Core completion module with shell detection, script generation, and installation logic
scripts/install_completion.py Standalone installation script for shell completion setup
docs/shell-completion.md Comprehensive documentation covering installation, usage, and troubleshooting
README.md Updates main documentation with completion setup instructions

@fredvisser fredvisser merged commit d4e1d70 into main Jul 28, 2025
1 check passed
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.

2 participants