mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:45:45 +02:00
Windows ps update (#909)
* query command with json, web, xml * query xml now working * clippy * comment out web tests * Initial work on query web For now we can query everything except tables * Support for querying tables Now we can query multiple tables just like before, now the only thing missing is the test coverage * Revert "Query plugin" * augment `ps -l` on windows to display more info Co-authored-by: Luccas Mateus de Medeiros Gomes <luccasmmg@gmail.com>
This commit is contained in:
@ -104,6 +104,23 @@ fn run_ps(engine_state: &EngineState, call: &Call) -> Result<PipelineData, Shell
|
||||
val: proc.command(),
|
||||
span,
|
||||
});
|
||||
#[cfg(windows)]
|
||||
{
|
||||
cols.push("cwd".to_string());
|
||||
vals.push(Value::String {
|
||||
val: proc.cwd(),
|
||||
span,
|
||||
});
|
||||
cols.push("environment".to_string());
|
||||
vals.push(Value::List {
|
||||
vals: proc
|
||||
.environ()
|
||||
.iter()
|
||||
.map(|x| Value::string(x.to_string(), span))
|
||||
.collect(),
|
||||
span,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
output.push(Value::Record { cols, vals, span });
|
||||
|
Reference in New Issue
Block a user