diff --git a/crates/nu-command/src/viewers/table.rs b/crates/nu-command/src/viewers/table.rs index 9ee74e3ed6..e081bdb9de 100644 --- a/crates/nu-command/src/viewers/table.rs +++ b/crates/nu-command/src/viewers/table.rs @@ -625,11 +625,24 @@ fn build_table_kv( } fn build_table_batch( - vals: Vec, + mut vals: Vec, view: TableView, opts: TableOpts<'_>, span: Span, ) -> StringResult { + // convert each custom value to its base value so it can be properly + // displayed in a table + for val in &mut vals { + let span = val.span(); + + if let Value::Custom { val: custom, .. } = val { + *val = custom + .to_base_value(span) + .or_else(|err| Result::<_, ShellError>::Ok(Value::error(err, span))) + .expect("error converting custom value to base value") + } + } + match view { TableView::General => JustTable::table(&vals, opts), TableView::Expanded {