diff --git a/Cargo.lock b/Cargo.lock index d9509e54..a8664424 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -362,6 +362,7 @@ dependencies = [ "clap", "clap-verbosity-flag", "clap_complete", + "clap_complete_nushell", "colored", "fuzzy-matcher", "indexmap 2.7.0", @@ -698,6 +699,16 @@ dependencies = [ "clap", ] +[[package]] +name = "clap_complete_nushell" +version = "4.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6a8b1593457dfc2fe539002b795710d022dc62a65bf15023f039f9760c7b18a" +dependencies = [ + "clap", + "clap_complete", +] + [[package]] name = "clap_derive" version = "4.5.18" diff --git a/Cargo.toml b/Cargo.toml index 4ab4963a..5981558f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,6 +99,7 @@ tempfile.workspace = true tokio = { workspace = true, optional = true } bon.workspace = true users.workspace = true +clap_complete_nushell = "4.5.5" [features] # Top level features diff --git a/src/commands/completions.rs b/src/commands/completions.rs index 5f7ff119..c761ea9e 100644 --- a/src/commands/completions.rs +++ b/src/commands/completions.rs @@ -1,15 +1,18 @@ use clap::{Args, CommandFactory}; -use clap_complete::{generate, Shell as CompletionShell}; +use clap_complete::generate; use miette::Result; +use shells::Shells; use crate::commands::BlueBuildArgs; use super::BlueBuildCommand; +mod shells; + #[derive(Debug, Clone, Args)] pub struct CompletionsCommand { #[arg(value_enum)] - shell: CompletionShell, + shell: Shells, } impl BlueBuildCommand for CompletionsCommand {