forked from extern/nushell
plugin path for $nu (#398)
This commit is contained in:
parent
45eba8b922
commit
99de2b1d77
@ -37,7 +37,7 @@ ctrlc = "3.2.1"
|
|||||||
# mimalloc = { version = "*", default-features = false }
|
# mimalloc = { version = "*", default-features = false }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
plugin = ["nu-plugin", "nu-parser/plugin", "nu-command/plugin", "nu-protocol/plugin"]
|
plugin = ["nu-plugin", "nu-parser/plugin", "nu-command/plugin", "nu-protocol/plugin", "nu-engine/plugin"]
|
||||||
dataframe = ["nu-command/dataframe"]
|
dataframe = ["nu-command/dataframe"]
|
||||||
default = ["plugin"]
|
default = ["plugin"]
|
||||||
|
|
||||||
|
@ -5,7 +5,10 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nu-parser = { path = "../nu-parser" }
|
nu-parser = { path = "../nu-parser" }
|
||||||
nu-protocol = { path = "../nu-protocol" }
|
nu-protocol = { path = "../nu-protocol", features = ["plugin"] }
|
||||||
nu-path = { path = "../nu-path" }
|
nu-path = { path = "../nu-path" }
|
||||||
itertools = "0.10.1"
|
itertools = "0.10.1"
|
||||||
chrono = { version="0.4.19", features=["serde"] }
|
chrono = { version="0.4.19", features=["serde"] }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
plugin = []
|
||||||
|
@ -507,6 +507,17 @@ pub fn eval_variable(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "plugin")]
|
||||||
|
if let Some(path) = &engine_state.plugin_signatures {
|
||||||
|
if let Some(path_str) = path.to_str() {
|
||||||
|
output_cols.push("plugin-path".into());
|
||||||
|
output_vals.push(Value::String {
|
||||||
|
val: path_str.into(),
|
||||||
|
span,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if let Ok(cwd) = std::env::var("PWD") {
|
if let Ok(cwd) = std::env::var("PWD") {
|
||||||
output_cols.push("pwd".into());
|
output_cols.push("pwd".into());
|
||||||
output_vals.push(Value::String { val: cwd, span })
|
output_vals.push(Value::String { val: cwd, span })
|
||||||
|
Loading…
Reference in New Issue
Block a user