Introduce footer_inheritance option (#14070)

```nu
$env.config.table.footer_inheritance = true
```

close #14060
This commit is contained in:
Maxim Zhiburt
2024-10-23 20:45:47 +03:00
committed by GitHub
parent 619211c1bf
commit 3ec1c40320
8 changed files with 222 additions and 67 deletions

View File

@ -18,9 +18,12 @@ pub fn create_nu_table_config(
expand: bool,
mode: TableMode,
) -> NuTableConfig {
let with_footer = (config.table.footer_inheritance && out.with_footer)
|| with_footer(config, out.with_header, out.table.count_rows());
NuTableConfig {
theme: load_theme(mode),
with_footer: with_footer(config, out.with_header, out.table.count_rows()),
with_footer,
with_index: out.with_index,
with_header: out.with_header,
split_color: Some(lookup_separator_color(comp)),