diff --git a/crates/nu-color-config/src/color_config.rs b/crates/nu-color-config/src/color_config.rs index 0bef0d6ec..c4d31d611 100644 --- a/crates/nu-color-config/src/color_config.rs +++ b/crates/nu-color-config/src/color_config.rs @@ -161,6 +161,13 @@ pub fn lookup_ansi_color_style(s: &str) -> Style { "dgrbl" | "dark_gray_blink" => Color::DarkGray.blink(), "dgrst" | "dark_gray_strike" => Color::DarkGray.strikethrough(), + "def" | "default" => Color::Default.normal(), + "defb" | "default_bold" => Color::Default.bold(), + "defu" | "default_underline" => Color::Default.underline(), + "defi" | "default_italic" => Color::Default.italic(), + "defd" | "default_dimmed" => Color::Default.dimmed(), + "defr" | "default_reverse" => Color::Default.reverse(), + _ => Color::White.normal(), } } diff --git a/crates/nu-command/src/platform/ansi/ansi_.rs b/crates/nu-command/src/platform/ansi/ansi_.rs index 3baab4bd9..f2a1d058e 100644 --- a/crates/nu-command/src/platform/ansi/ansi_.rs +++ b/crates/nu-command/src/platform/ansi/ansi_.rs @@ -130,12 +130,12 @@ lazy_static! { AnsiCode{ short_name: Some("dgrd"), long_name: "dark_gray_dimmed", code: Color::DarkGray.dimmed().prefix().to_string()}, AnsiCode{ short_name: Some("dgrr"), long_name: "dark_gray_reverse", code: Color::DarkGray.reverse().prefix().to_string()}, - AnsiCode{ short_name: Some("der"), long_name: "default", code: Color::Default.prefix().to_string()}, - AnsiCode{ short_name: Some("deb"), long_name: "default_bold", code: Color::Default.bold().prefix().to_string()}, - AnsiCode{ short_name: Some("deu"), long_name: "default_underline", code: Color::Default.underline().prefix().to_string()}, - AnsiCode{ short_name: Some("dei"), long_name: "default_italic", code: Color::Default.italic().prefix().to_string()}, - AnsiCode{ short_name: Some("ded"), long_name: "default_dimmed", code: Color::Default.dimmed().prefix().to_string()}, - AnsiCode{ short_name: Some("der"), long_name: "default_reverse", code: Color::Default.reverse().prefix().to_string()}, + AnsiCode{ short_name: Some("def"), long_name: "default", code: Color::Default.prefix().to_string()}, + AnsiCode{ short_name: Some("defb"), long_name: "default_bold", code: Color::Default.bold().prefix().to_string()}, + AnsiCode{ short_name: Some("defu"), long_name: "default_underline", code: Color::Default.underline().prefix().to_string()}, + AnsiCode{ short_name: Some("defi"), long_name: "default_italic", code: Color::Default.italic().prefix().to_string()}, + AnsiCode{ short_name: Some("defd"), long_name: "default_dimmed", code: Color::Default.dimmed().prefix().to_string()}, + AnsiCode{ short_name: Some("defr"), long_name: "default_reverse", code: Color::Default.reverse().prefix().to_string()}, AnsiCode{ short_name: None, long_name: "reset", code: "\x1b[0m".to_owned()}, // Reference for ansi codes https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797