mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 04:29:24 +02:00
add temp-path
to $nu
(#471)
This commit is contained in:
@ -552,6 +552,15 @@ pub fn eval_variable(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let temp = std::env::temp_dir();
|
||||||
|
if let Some(temp_path) = temp.to_str() {
|
||||||
|
output_cols.push("temp-path".into());
|
||||||
|
output_vals.push(Value::String {
|
||||||
|
val: temp_path.into(),
|
||||||
|
span,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
Ok(Value::Record {
|
Ok(Value::Record {
|
||||||
cols: output_cols,
|
cols: output_cols,
|
||||||
vals: output_vals,
|
vals: output_vals,
|
||||||
|
Reference in New Issue
Block a user