From c55b6c5ed54f8fbee3c38c40c73bb54921de676a Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Sun, 16 Jan 2022 16:40:40 -0600 Subject: [PATCH] fix list formatting (#762) --- crates/nu-command/src/viewers/table.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/nu-command/src/viewers/table.rs b/crates/nu-command/src/viewers/table.rs index b454d383b9..8534c2c3aa 100644 --- a/crates/nu-command/src/viewers/table.rs +++ b/crates/nu-command/src/viewers/table.rs @@ -283,8 +283,10 @@ fn convert_to_table( vec![("string".to_string(), (row_num + row_offset).to_string())]; if headers.is_empty() { - // if header row is empty, this is probably a list so format it that way - row.push(("list".to_string(), item.into_abbreviated_string(config))) + row.push(( + item.get_type().to_string(), + item.into_abbreviated_string(config), + )) } else { for header in headers.iter().skip(1) { let result = match item {