diff --git a/Cargo.lock b/Cargo.lock index 28f07f6851..7b891be920 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3496,17 +3496,14 @@ dependencies = [ name = "nu-completion" version = "0.32.1" dependencies = [ - "directories-next", "dirs-next", "indexmap", "nu-data", - "nu-engine", "nu-errors", "nu-parser", "nu-protocol", "nu-source", "nu-test-support", - "rustyline", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 39dfb3ff4d..b8fb8d26a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,6 +69,7 @@ ctrlc-support = ["nu-cli/ctrlc", "nu-command/ctrlc"] directories-support = [ "nu-cli/directories", "nu-cli/dirs", + "nu-completion/dirs", "nu-command/directories", "nu-command/dirs", "nu-data/directories", diff --git a/crates/nu-completion/Cargo.toml b/crates/nu-completion/Cargo.toml index 0de1bbd63c..448605fec7 100644 --- a/crates/nu-completion/Cargo.toml +++ b/crates/nu-completion/Cargo.toml @@ -11,19 +11,14 @@ doctest = false [dependencies] nu-data = { version = "0.32.1", path = "../nu-data" } -nu-engine = { version = "0.32.1", path = "../nu-engine" } nu-errors = { version = "0.32.1", path = "../nu-errors" } nu-parser = { version = "0.32.1", path = "../nu-parser" } nu-protocol = { version = "0.32.1", path = "../nu-protocol" } nu-source = { version = "0.32.1", path = "../nu-source" } nu-test-support = { version = "0.32.1", path = "../nu-test-support" } -directories-next = { version = "2.0.0", optional = true } dirs-next = { version = "2.0.0", optional = true } indexmap = { version = "1.6.1", features = ["serde-1"] } -rustyline = { version = "8.1.0", optional = true } [features] -rustyline-support = ["rustyline", "nu-engine/rustyline-support"] dirs = ["dirs-next"] -directories = ["directories-next"] diff --git a/crates/nu-completion/src/path.rs b/crates/nu-completion/src/path.rs index b5247f765d..2ec26f4a73 100644 --- a/crates/nu-completion/src/path.rs +++ b/crates/nu-completion/src/path.rs @@ -26,7 +26,7 @@ impl PathCompleter { let base_dir = if base_dir_name.is_empty() { PathBuf::from(".") } else { - #[cfg(feature = "directories")] + #[cfg(feature = "dirs")] { let home_prefix = format!("~{}", SEP); if base_dir_name.starts_with(&home_prefix) { @@ -37,7 +37,7 @@ impl PathCompleter { PathBuf::from(base_dir_name) } } - #[cfg(not(feature = "directories"))] + #[cfg(not(feature = "dirs"))] { PathBuf::from(base_dir_name) }