mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Clean up nu-completion dependencies. (#3645)
This commit is contained in:
committed by
GitHub
parent
1e4678f929
commit
bd44bcee32
@ -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"]
|
||||
|
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user