mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:46:01 +02:00
Add an option to set header on border (style) (#9920)
fix #9796 Sorry that you've had the issues. I've actually encountered them yesterday too (seems like they have appeared after some refactoring in the middle) but was not able to fix that rapid. Created a bunch of tests. cc: @fdncred Note: This option will be certainly slower then a default ones. (could be fixed but ... maybe later). Maybe it shall be cited somewhere. PS: Haven't tested on a wrapped/expanded tables. --------- Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com> Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
@ -70,6 +70,7 @@ pub struct Config {
|
||||
pub external_completer: Option<usize>,
|
||||
pub filesize_metric: bool,
|
||||
pub table_mode: String,
|
||||
pub table_move_header: bool,
|
||||
pub table_show_empty: bool,
|
||||
pub use_ls_colors: bool,
|
||||
pub color_config: HashMap<String, Value>,
|
||||
@ -126,6 +127,7 @@ impl Default for Config {
|
||||
table_index_mode: TableIndexMode::Always,
|
||||
table_show_empty: true,
|
||||
trim_strategy: TRIM_STRATEGY_DEFAULT,
|
||||
table_move_header: false,
|
||||
|
||||
datetime_normal_format: None,
|
||||
datetime_table_format: None,
|
||||
@ -926,6 +928,9 @@ impl Value {
|
||||
Value::string(config.table_mode.clone(), span);
|
||||
}
|
||||
}
|
||||
"header_on_separator" => {
|
||||
try_bool!(cols, vals, index, span, table_move_header)
|
||||
}
|
||||
"index_mode" => {
|
||||
if let Ok(b) = value.as_string() {
|
||||
let val_str = b.to_lowercase();
|
||||
|
Reference in New Issue
Block a user