From 0a3fec5e8ba1dbba36457c3cd9df172f4e70187f Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 3 Mar 2021 19:20:28 +0100 Subject: [PATCH] __fish_print_pipestatus: Reset modifiers again Called as __fish_print_pipestatus "[foo" "oof]" "|" (set_color green) (set_color --bold blue) 0 1 2 it would make the closing `oof]` bold green. Fixes #7771. --- share/functions/__fish_print_pipestatus.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_print_pipestatus.fish b/share/functions/__fish_print_pipestatus.fish index 898f8e4a6..b33cd2cd3 100644 --- a/share/functions/__fish_print_pipestatus.fish +++ b/share/functions/__fish_print_pipestatus.fish @@ -28,8 +28,10 @@ function __fish_print_pipestatus --description "Print pipestatus for prompt" if test "$last_status" -ne "$argv[-1]" set last_status_string " "$status_color$last_status end - printf "%s" $brace_sep_color $left_brace \ + set -l normal (set_color normal) + # The "normal"s are to reset modifiers like bold - see #7771. + printf "%s" $normal $brace_sep_color $left_brace \ $status_color $last_pipestatus_string \ - $brace_sep_color $right_brace $last_status_string (set_color normal) + $normal $brace_sep_color $right_brace $normal $last_status_string $normal end end