mirror of
https://github.com/nushell/nushell
synced 2024-12-28 14:03:09 +00:00
use PipelineData::Value::print
to print the Value
s
For now, the result is the same as the output of the commands but piped into `str join "\n"`! Progress is being made...
This commit is contained in:
parent
2927d70fcc
commit
d2633cc59b
1 changed files with 8 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
use nu_protocol::{
|
||||
ast::Call,
|
||||
engine::{EngineState, Stack},
|
||||
Example, IntoPipelineData, Signature, Span, SyntaxShape, Value,
|
||||
Example, IntoPipelineData, PipelineData, Signature, Span, SyntaxShape, Value,
|
||||
};
|
||||
use std::fmt::Write;
|
||||
|
||||
|
@ -213,7 +213,13 @@ fn get_documentation(
|
|||
|
||||
match &example.result {
|
||||
Some(result) => {
|
||||
let _ = write!(long_desc, " {}\n", result.into_string(" ", engine_state.get_config()));
|
||||
for item in PipelineData::Value(result.clone(), None) {
|
||||
let _ = write!(
|
||||
long_desc,
|
||||
"{}\n",
|
||||
item.into_string("\n", engine_state.get_config())
|
||||
);
|
||||
}
|
||||
}
|
||||
None => {
|
||||
let _ = write!(long_desc, " {WD}...{RESET}\n");
|
||||
|
|
Loading…
Reference in a new issue