mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:55:42 +02:00
Add an option to move header on borders (#9796)
A patch to play with. Need to make a few tests after all. The question is what shall be done with `table.mode = none`, as it has no borders. ```nu $env.config.table.move_header = true ```  cc: @fdncred --------- Signed-off-by: Maxim Zhiburt <zhiburt@gmail.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