Skip to content

Conversation

@dipankardas011
Copy link
Member

πŸ—’οΈ Changelog

This pull request introduces a new feature to generate shell completion scripts for the ksctl CLI tool, along with integrating this feature into the command mapping. The changes include the addition of a new command and its registration in the CLI.

Added functionality for shell completion:

  • cmd/completion.go: Introduced a new ShellCompletion method in the KsctlCommand struct. This method provides a cobra.Command implementation to generate shell completion scripts for Bash, Zsh, and Fish shells. It includes detailed usage instructions and handles unsupported shell inputs gracefully.

Integration into the command mapping:

  • cmd/handler.go: Registered the new ShellCompletion command in the CommandMapping function, ensuring it is available as part of the CLI.

πŸ‹πŸΌ Issues

βœ… Completed Issues

πŸ” Review Checklist

  • Code follows project style guidelines
  • Added/updated tests
  • Ran tests locally
  • Updated documentation
  • Checked Contribution Guidelines

πŸ“Έ Screenshots/Recordings

πŸ“Œ Additional Notes


πŸ’‘ PR best practices
  • Keep changes focused and atomic
  • Update tests and documentation
  • Check for conflicts with main branch
  • Respond promptly to review comments
  • Follow project coding standards
  • Make sure you are using pre-commit for that run this command $ pre-commit install

Introduce shell completion support for bash, zsh, and fish shells.
This includes a new `completion` command that generates the necessary
scripts for each shell.

Signed-off-by: Dipankar Das <65275144+dipankardas011@users.noreply.github.com>
@dipankardas011 dipankardas011 requested a review from Horiodino as a code owner May 5, 2025 16:07
@dipankardas011 dipankardas011 merged commit 5325966 into main May 5, 2025
8 checks 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.

[Enhancement]: shell completions

2 participants