diff --git a/src/commands/get.rs b/src/commands/get.rs index e8fc62ca6..21dbe6b0a 100644 --- a/src/commands/get.rs +++ b/src/commands/get.rs @@ -60,11 +60,19 @@ pub fn get_column_path( possible_matches.sort(); - return Err(ShellError::labeled_error( - "Unknown column", - format!("did you mean '{}'?", possible_matches[0].1), - tag_for_tagged_list(path.iter().map(|p| p.tag())), - )); + if possible_matches.len() > 0 { + return Err(ShellError::labeled_error( + "Unknown column", + format!("did you mean '{}'?", possible_matches[0].1), + tag_for_tagged_list(path.iter().map(|p| p.tag())), + )); + } else { + return Err(ShellError::labeled_error( + "Unknown column", + "row does not contain this column", + tag_for_tagged_list(path.iter().map(|p| p.tag())), + )); + } } } } diff --git a/src/format/table.rs b/src/format/table.rs index b2680a6c9..f4b318dae 100644 --- a/src/format/table.rs +++ b/src/format/table.rs @@ -42,7 +42,7 @@ impl TableView { let mut headers = TableView::merge_descriptors(values); if headers.len() == 0 { - headers.push("value".to_string()); + headers.push("".to_string()); } let mut entries = vec![];