mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 01:43:47 +01:00
parent
c07835f3ad
commit
d255a2a050
@ -11,12 +11,12 @@ pub struct NuStyle {
|
||||
pub fn parse_nustyle(nu_style: NuStyle) -> Style {
|
||||
// get the nu_ansi_term::Color foreground color
|
||||
let fg_color = match nu_style.fg {
|
||||
Some(fg) => color_from_hex(&fg).expect("error with foreground color"),
|
||||
Some(fg) => color_from_hex(&fg).unwrap_or_default(),
|
||||
_ => None,
|
||||
};
|
||||
// get the nu_ansi_term::Color background color
|
||||
let bg_color = match nu_style.bg {
|
||||
Some(bg) => color_from_hex(&bg).expect("error with background color"),
|
||||
Some(bg) => color_from_hex(&bg).unwrap_or_default(),
|
||||
_ => None,
|
||||
};
|
||||
// get the attributes
|
||||
|
Loading…
Reference in New Issue
Block a user