mirror of
https://github.com/nushell/nushell
synced 2025-01-28 04:45:18 +00:00
add heavy & none table border options (#2686)
This commit is contained in:
parent
db590369a8
commit
1eb28c6cb6
2 changed files with 62 additions and 0 deletions
|
@ -59,6 +59,8 @@ pub fn table_mode(config: &NuConfig) -> nu_table::Theme {
|
||||||
Ok(m) if m == "compact_double" => nu_table::Theme::compact_double(),
|
Ok(m) if m == "compact_double" => nu_table::Theme::compact_double(),
|
||||||
Ok(m) if m == "rounded" => nu_table::Theme::rounded(),
|
Ok(m) if m == "rounded" => nu_table::Theme::rounded(),
|
||||||
Ok(m) if m == "reinforced" => nu_table::Theme::reinforced(),
|
Ok(m) if m == "reinforced" => nu_table::Theme::reinforced(),
|
||||||
|
Ok(m) if m == "heavy" => nu_table::Theme::heavy(),
|
||||||
|
Ok(m) if m == "none" => nu_table::Theme::none(),
|
||||||
_ => nu_table::Theme::compact(),
|
_ => nu_table::Theme::compact(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -536,6 +536,66 @@ impl Theme {
|
||||||
print_bottom_border: true,
|
print_bottom_border: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
pub fn heavy() -> Theme {
|
||||||
|
Theme {
|
||||||
|
top_left: '┏',
|
||||||
|
middle_left: '┣',
|
||||||
|
bottom_left: '┗',
|
||||||
|
top_center: '┳',
|
||||||
|
center: '╋',
|
||||||
|
bottom_center: '┻',
|
||||||
|
top_right: '┓',
|
||||||
|
middle_right: '┫',
|
||||||
|
bottom_right: '┛',
|
||||||
|
top_horizontal: '━',
|
||||||
|
middle_horizontal: '━',
|
||||||
|
bottom_horizontal: '━',
|
||||||
|
|
||||||
|
left_vertical: '┃',
|
||||||
|
center_vertical: '┃',
|
||||||
|
right_vertical: '┃',
|
||||||
|
|
||||||
|
separate_header: true,
|
||||||
|
separate_rows: false,
|
||||||
|
|
||||||
|
print_left_border: true,
|
||||||
|
print_right_border: true,
|
||||||
|
print_top_border: true,
|
||||||
|
print_bottom_border: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
|
pub fn none() -> Theme {
|
||||||
|
Theme {
|
||||||
|
top_left: ' ',
|
||||||
|
middle_left: ' ',
|
||||||
|
bottom_left: ' ',
|
||||||
|
top_center: ' ',
|
||||||
|
center: ' ',
|
||||||
|
bottom_center: ' ',
|
||||||
|
top_right: ' ',
|
||||||
|
middle_right: ' ',
|
||||||
|
bottom_right: ' ',
|
||||||
|
|
||||||
|
top_horizontal: ' ',
|
||||||
|
middle_horizontal: ' ',
|
||||||
|
bottom_horizontal: ' ',
|
||||||
|
|
||||||
|
left_vertical: ' ',
|
||||||
|
center_vertical: ' ',
|
||||||
|
right_vertical: ' ',
|
||||||
|
|
||||||
|
separate_header: false,
|
||||||
|
separate_rows: false,
|
||||||
|
|
||||||
|
print_left_border: false,
|
||||||
|
print_right_border: false,
|
||||||
|
print_top_border: false,
|
||||||
|
print_bottom_border: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Table {
|
impl Table {
|
||||||
|
|
Loading…
Reference in a new issue