diff --git a/crates/nu-table/src/types/general.rs b/crates/nu-table/src/types/general.rs index ebae8660c7..2727e89022 100644 --- a/crates/nu-table/src/types/general.rs +++ b/crates/nu-table/src/types/general.rs @@ -40,9 +40,13 @@ fn list_table(input: Vec, opts: TableOpts<'_>) -> Result, Ok(table) } +fn get_key_style(topts: &TableOpts<'_>) -> TextStyle { + get_header_style(&topts.style_computer).alignment(nu_color_config::Alignment::Left) +} + fn kv_table(record: Record, opts: TableOpts<'_>) -> StringResult { let mut table = NuTable::new(record.len(), 2); - table.set_index_style(TextStyle::default_field()); + table.set_index_style(get_key_style(&opts)); table.set_indent(opts.config.table.padding); for (i, (key, value)) in record.into_iter().enumerate() {