forked from extern/nushell
Clean up nu-completion dependencies. (#3645)
This commit is contained in:
parent
1e4678f929
commit
bd44bcee32
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -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]]
|
||||
|
@ -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",
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user