mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:15:53 +02:00
Add infrastructure for experimental options (#16028)
Co-authored-by: Bahex <Bahex@users.noreply.github.com>
This commit is contained in:
@ -16,6 +16,7 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", default-features = false }
|
||||
nu-experimental = { path = "../nu-experimental", version = "0.105.2" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
|
||||
|
@ -188,6 +188,17 @@ pub fn version(engine_state: &EngineState, span: Span) -> Result<PipelineData, S
|
||||
);
|
||||
}
|
||||
|
||||
record.push(
|
||||
"experimental_options",
|
||||
Value::string(
|
||||
nu_experimental::ALL
|
||||
.iter()
|
||||
.map(|option| format!("{}={}", option.identifier(), option.get()))
|
||||
.join(", "),
|
||||
span,
|
||||
),
|
||||
);
|
||||
|
||||
Ok(Value::record(record, span).into_pipeline_data())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user