mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 10:28:33 +02:00
Introduce footer_inheritance option (#14070)
```nu $env.config.table.footer_inheritance = true ``` close #14060
This commit is contained in:
@ -333,6 +333,7 @@ pub struct TableConfig {
|
||||
pub trim: TrimStrategy,
|
||||
pub header_on_separator: bool,
|
||||
pub abbreviated_row_count: Option<usize>,
|
||||
pub footer_inheritance: bool,
|
||||
}
|
||||
|
||||
impl IntoValue for TableConfig {
|
||||
@ -350,6 +351,7 @@ impl IntoValue for TableConfig {
|
||||
"trim" => self.trim.into_value(span),
|
||||
"header_on_separator" => self.header_on_separator.into_value(span),
|
||||
"abbreviated_row_count" => abbv_count,
|
||||
"footer_inheritance" => self.footer_inheritance.into_value(span),
|
||||
}
|
||||
.into_value(span)
|
||||
}
|
||||
@ -365,6 +367,7 @@ impl Default for TableConfig {
|
||||
header_on_separator: false,
|
||||
padding: TableIndent::default(),
|
||||
abbreviated_row_count: None,
|
||||
footer_inheritance: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -401,6 +404,7 @@ impl UpdateFromValue for TableConfig {
|
||||
}
|
||||
_ => errors.type_mismatch(path, Type::custom("int or nothing"), val),
|
||||
},
|
||||
"footer_inheritance" => self.footer_inheritance.update(val, path, errors),
|
||||
_ => errors.unknown_option(path, val),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user