Add support for 'open' (#573)

This commit is contained in:
JT
2021-12-25 06:24:55 +11:00
committed by GitHub
parent 1efae6876d
commit a811eee6b8
14 changed files with 231 additions and 44 deletions

View File

@ -594,9 +594,9 @@ fn print_pipeline_data(
PipelineData::ByteStream(stream, _, _) => {
for v in stream {
let s = if v.iter().all(|x| x.is_ascii()) {
format!("{}", String::from_utf8_lossy(&v))
format!("{}", String::from_utf8_lossy(&v?))
} else {
format!("{}\n", nu_pretty_hex::pretty_hex(&v))
format!("{}\n", nu_pretty_hex::pretty_hex(&v?))
};
println!("{}", s);
}