add nushell completions#1232
Conversation
There was a problem hiding this comment.
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
|
To be clear, those spaces aren't on main. You're just asking why the CI didn't catch it here. Good question. |
|
I say "introduced" because I ran into it while looking at potentially resolving a merge conflict. |

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