Skip to content

feat(completion): Implement completion commands#3

Merged
jongwooo merged 1 commit intomainfrom
feat/implement-completion-commands
Aug 20, 2025
Merged

feat(completion): Implement completion commands#3
jongwooo merged 1 commit intomainfrom
feat/implement-completion-commands

Conversation

@jongwooo
Copy link
Contributor

This pull request adds shell completion support to the morpherctl CLI, allowing users to easily generate completion scripts for bash, zsh, fish, and powershell. The changes include a new completion command, supporting logic for script generation, and corresponding tests to ensure correctness.

Shell completion feature:

  • Added a new completion subcommand to morpherctl that generates shell completion scripts for bash, zsh, fish, and powershell, with usage instructions and argument validation in cmd/completion/completion.go.
  • Integrated the completion command into the root command by importing and registering it in cmd/root.go. [1] [2]

Completion logic and testing:

  • Implemented shell completion script generation logic and supported shell listing in internal/completion/completion.go.
  • Added unit tests for completion generation and supported shells in internal/completion/completion_test.go.

@jongwooo jongwooo requested a review from Copilot August 20, 2025 03:07
@jongwooo jongwooo self-assigned this Aug 20, 2025
@jongwooo jongwooo added the feat label Aug 20, 2025
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 pull request implements shell completion support for the morpherctl CLI tool, enabling users to generate completion scripts for bash, zsh, fish, and powershell shells.

  • Adds a new completion command with argument validation and usage instructions
  • Implements completion script generation logic with support for four major shells
  • Includes comprehensive unit tests for the completion functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
cmd/completion/completion.go Defines the completion command with usage examples and shell validation
internal/completion/completion.go Implements core completion generation logic and supported shells listing
internal/completion/completion_test.go Provides unit tests for completion generation and shell support validation
cmd/root.go Integrates the completion command into the root CLI command structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jongwooo jongwooo merged commit 48d06e5 into main Aug 20, 2025
4 checks passed
@jongwooo jongwooo deleted the feat/implement-completion-commands branch August 20, 2025 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments