mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Ps: add cwd
column on linux and macos (#10347)
# Description Close: #7484 Just found that I want `cwd` column on linux/macos as well..
This commit is contained in:
@ -143,6 +143,7 @@ fn run_ps(engine_state: &EngineState, call: &Call) -> Result<PipelineData, Shell
|
||||
// record.push("tpg_id", Value::int(proc_stat.tpgid as i64, span));
|
||||
record.push("priority", Value::int(proc_stat.priority, span));
|
||||
record.push("process_threads", Value::int(proc_stat.num_threads, span));
|
||||
record.push("cwd", Value::string(proc.cwd(), span));
|
||||
}
|
||||
#[cfg(windows)]
|
||||
{
|
||||
@ -184,6 +185,10 @@ fn run_ps(engine_state: &EngineState, call: &Call) -> Result<PipelineData, Shell
|
||||
),
|
||||
);
|
||||
}
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
record.push("cwd", Value::string(proc.cwd(), span));
|
||||
}
|
||||
}
|
||||
|
||||
output.push(Value::record(record, span));
|
||||
|
Reference in New Issue
Block a user