Improve list view and ranges (#1753)

This commit is contained in:
Jonathan Turner 2020-05-12 08:06:09 +12:00 committed by GitHub
parent c3a066eeb4
commit 2275575575
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -176,6 +176,13 @@ pub fn autoview(context: RunnableContext) -> Result<OutputStream, ShellError> {
} => {
out!("{}", d);
}
Value {
value: UntaggedValue::Primitive(Primitive::Range(_)),
..
} => {
let output = format_leaf(&x).plain_string(100_000);
out!("{}", output);
}
Value { value: UntaggedValue::Primitive(Primitive::Binary(ref b)), .. } => {
if let Some(binary) = binary {

View File

@ -374,7 +374,8 @@ impl RenderView for TableView {
}
}
let skip_headers = self.headers.len() == 2 && self.headers[1] == "";
let skip_headers = (self.headers.len() == 2 && self.headers[1] == "")
|| (self.headers.len() == 1 && self.headers[0] == "");
let header: Vec<Cell> = self
.headers