From cc64da62a9288da6c7f6f7435f716224836c520b Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 10 Apr 2026 23:13:19 +0800 Subject: [PATCH] fish_color_valid_path: also apply bg and underline colors Closes #12622 --- src/highlight/highlight.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/highlight/highlight.rs b/src/highlight/highlight.rs index baf6f9a90..ae0a2fdcf 100644 --- a/src/highlight/highlight.rs +++ b/src/highlight/highlight.rs @@ -190,10 +190,15 @@ fn resolve_spec_uncached(highlight: &HighlightSpec, vars: &dyn Environment) -> T if highlight.valid_path { if let Some(valid_path_var) = vars.get(L!("fish_color_valid_path")) { let valid_path_face = parse_text_face(valid_path_var.as_list()); - // Historical behavior is to not apply background. if let Some(fg) = valid_path_face.fg { face.fg = fg; } + if let Some(bg) = valid_path_face.bg { + face.bg = bg; + } + if let Some(underline_color) = valid_path_face.underline_color { + face.underline_color = underline_color; + } face.style = face.style.union_prefer_right(valid_path_face.style); } }