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"
|
name = "nu-completion"
|
||||||
version = "0.32.1"
|
version = "0.32.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"directories-next",
|
|
||||||
"dirs-next",
|
"dirs-next",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"nu-data",
|
"nu-data",
|
||||||
"nu-engine",
|
|
||||||
"nu-errors",
|
"nu-errors",
|
||||||
"nu-parser",
|
"nu-parser",
|
||||||
"nu-protocol",
|
"nu-protocol",
|
||||||
"nu-source",
|
"nu-source",
|
||||||
"nu-test-support",
|
"nu-test-support",
|
||||||
"rustyline",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -69,6 +69,7 @@ ctrlc-support = ["nu-cli/ctrlc", "nu-command/ctrlc"]
|
|||||||
directories-support = [
|
directories-support = [
|
||||||
"nu-cli/directories",
|
"nu-cli/directories",
|
||||||
"nu-cli/dirs",
|
"nu-cli/dirs",
|
||||||
|
"nu-completion/dirs",
|
||||||
"nu-command/directories",
|
"nu-command/directories",
|
||||||
"nu-command/dirs",
|
"nu-command/dirs",
|
||||||
"nu-data/directories",
|
"nu-data/directories",
|
||||||
|
@ -11,19 +11,14 @@ doctest = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-data = { version = "0.32.1", path = "../nu-data" }
|
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-errors = { version = "0.32.1", path = "../nu-errors" }
|
||||||
nu-parser = { version = "0.32.1", path = "../nu-parser" }
|
nu-parser = { version = "0.32.1", path = "../nu-parser" }
|
||||||
nu-protocol = { version = "0.32.1", path = "../nu-protocol" }
|
nu-protocol = { version = "0.32.1", path = "../nu-protocol" }
|
||||||
nu-source = { version = "0.32.1", path = "../nu-source" }
|
nu-source = { version = "0.32.1", path = "../nu-source" }
|
||||||
nu-test-support = { version = "0.32.1", path = "../nu-test-support" }
|
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 }
|
dirs-next = { version = "2.0.0", optional = true }
|
||||||
indexmap = { version = "1.6.1", features = ["serde-1"] }
|
indexmap = { version = "1.6.1", features = ["serde-1"] }
|
||||||
rustyline = { version = "8.1.0", optional = true }
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
rustyline-support = ["rustyline", "nu-engine/rustyline-support"]
|
|
||||||
dirs = ["dirs-next"]
|
dirs = ["dirs-next"]
|
||||||
directories = ["directories-next"]
|
|
||||||
|
@ -26,7 +26,7 @@ impl PathCompleter {
|
|||||||
let base_dir = if base_dir_name.is_empty() {
|
let base_dir = if base_dir_name.is_empty() {
|
||||||
PathBuf::from(".")
|
PathBuf::from(".")
|
||||||
} else {
|
} else {
|
||||||
#[cfg(feature = "directories")]
|
#[cfg(feature = "dirs")]
|
||||||
{
|
{
|
||||||
let home_prefix = format!("~{}", SEP);
|
let home_prefix = format!("~{}", SEP);
|
||||||
if base_dir_name.starts_with(&home_prefix) {
|
if base_dir_name.starts_with(&home_prefix) {
|
||||||
@ -37,7 +37,7 @@ impl PathCompleter {
|
|||||||
PathBuf::from(base_dir_name)
|
PathBuf::from(base_dir_name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "directories"))]
|
#[cfg(not(feature = "dirs"))]
|
||||||
{
|
{
|
||||||
PathBuf::from(base_dir_name)
|
PathBuf::from(base_dir_name)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user