-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/shell completion #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 the Pangolin CLI, enabling tab-completion for bash, zsh, and fish shells. The implementation provides a custom completion command that generates appropriate completion scripts for each supported shell.
Key Changes
- Added custom
completioncommand with subcommands for bash, zsh, and fish - Updated
github.com/fosrl/newtdependency from v0.0.0 to v1.8.0 - Added comprehensive documentation for shell completion setup
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/completion/completion.go | New completion command implementation that generates shell-specific completion scripts |
| cmd/root.go | Integrates completion command into root CLI and removes default hidden completion options |
| go.mod | Updates newt dependency to v1.8.0 and moves spf13/pflag to indirect dependencies |
| go.sum | Adds dependency checksums for newt v1.8.0 and updates google/go-cmp to v0.7.0 |
| docs/pangolin_completion.md | New documentation with installation instructions for all supported shells |
| docs/pangolin.md | Updates root documentation to reference new completion command |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
To my knowledge, the It is also being used in generation of completion scripts when building in the Is there a benefit to defining this completion so explicitly? I can see this being necessary if using something like I am open to using |
My mistake here. I didn’t actually try the existing completion and only checked pangolin --help, which doesn’t show the command. I will close this PR. |
No worries! The |
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Adds a completion command that generates shell completion scripts for bash, zsh, and fish, enabling tab-completion for all pangolin CLI commands and flags.
How to test?