-
Couldn't load subscription status.
- Fork 103
add nushell completions #1232
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
add nushell completions #1232
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 Nushell completion support to juliaup by introducing a custom completion shell enum and generic completion generator. It cherry-picks changes from #1230 and enhances the help message to display available shell options.
- Adds Nushell as a supported shell for tab completions
- Replaces direct clap::Shell usage with a custom CompletionShell enum
- Implements a generic completion generator that handles both standard shells and Nushell
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/command_completions.rs | Implements generic completion generator with Nushell support |
| src/cli.rs | Adds CompletionShell enum and updates Completions command |
| Cargo.toml | Adds clap_complete_nushell dependency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Actually I think there is a way to simplify this... One sec |
|
I guess new tests are also needed? |
|
Ok the new refactor avoids the string conversion, it's much cleaner |
|
There's no tests of the completions utility but i can add some |
|
Just pushed some tests; everything should be ready now I think |
bd902fb to
81d384e
Compare
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.
LGTM
cherry picked from #1230
Also I added
#[arg(value_enum, value_name = "SHELL")]which makes the help message print the available shells.This also bumps the Cargo.lock