forked from extern/nushell
more table themes rounded and reinforced (#2579)
This commit is contained in:
parent
4c10351579
commit
2b13ac3856
@ -57,6 +57,8 @@ pub fn table_mode(config: &NuConfig) -> nu_table::Theme {
|
|||||||
Ok(m) if m == "thin" => nu_table::Theme::thin(),
|
Ok(m) if m == "thin" => nu_table::Theme::thin(),
|
||||||
Ok(m) if m == "with_love" => nu_table::Theme::with_love(),
|
Ok(m) if m == "with_love" => nu_table::Theme::with_love(),
|
||||||
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 == "reinforced" => nu_table::Theme::reinforced(),
|
||||||
_ => nu_table::Theme::compact(),
|
_ => nu_table::Theme::compact(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -476,6 +476,66 @@ impl Theme {
|
|||||||
print_bottom_border: true,
|
print_bottom_border: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
pub fn rounded() -> 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 reinforced() -> 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,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Table {
|
impl Table {
|
||||||
|
Loading…
Reference in New Issue
Block a user