Add infrastructure for experimental options (#16028)

Co-authored-by: Bahex <Bahex@users.noreply.github.com>
This commit is contained in:
Piepmatz
2025-07-01 18:36:51 +02:00
committed by GitHub
parent f4136aa3f4
commit a86a0dd16e
19 changed files with 731 additions and 24 deletions

View File

@ -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())
}