diff --git a/crates/nu-command/src/viewers/griddle.rs b/crates/nu-command/src/viewers/griddle.rs index fd1b1e9f82..d7747ca288 100644 --- a/crates/nu-command/src/viewers/griddle.rs +++ b/crates/nu-command/src/viewers/griddle.rs @@ -105,12 +105,10 @@ fn create_grid_output2( let cols = if let Some(col) = columns_param { col.parse::().unwrap_or(80) + } else if let Some((Width(w), Height(_h))) = terminal_size::terminal_size() { + w } else { - if let Some((Width(w), Height(_h))) = terminal_size::terminal_size() { - w - } else { - 80u16 - } + 80u16 }; if let Some(grid_display) = grid.fit_into_width(cols as usize) { @@ -218,7 +216,7 @@ fn convert_to_list2(iter: impl IntoIterator) -> Option = headers.into_iter().collect(); - let d: Vec> = data.into_iter().collect(); + // let d: Vec> = data.into_iter().collect(); // This is just a list if h.is_empty() { @@ -231,7 +229,7 @@ fn convert_to_list2(iter: impl IntoIterator) -> Option