add $nu.pid (#4828)

This commit is contained in:
Darren Schroeder 2022-03-12 10:54:59 -06:00 committed by GitHub
parent b342270112
commit 0ff9cc679e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1147,6 +1147,10 @@ pub fn eval_variable(
}) })
} }
let pid = std::process::id();
output_cols.push("pid".into());
output_vals.push(Value::int(pid as i64, span));
Ok(Value::Record { Ok(Value::Record {
cols: output_cols, cols: output_cols,
vals: output_vals, vals: output_vals,