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:
Darren Schroeder
2022-02-01 15:05:26 -06:00
committed by GitHub
parent 004d7b5ff0
commit cbdc0e2010
4 changed files with 432 additions and 29 deletions

View File

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