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

@ -65,9 +65,9 @@ impl Command for Table {
StringStream::from_stream(
stream.map(move |x| {
Ok(if x.iter().all(|x| x.is_ascii()) {
format!("{}", String::from_utf8_lossy(&x))
format!("{}", String::from_utf8_lossy(&x?))
} else {
format!("{}\n", nu_pretty_hex::pretty_hex(&x))
format!("{}\n", nu_pretty_hex::pretty_hex(&x?))
})
}),
ctrlc,