From 917f759a1a936ee45f6c36fe64710073adcaf483 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 7 Mar 2020 14:13:58 +0100 Subject: [PATCH] prompt: don't consider SIGPIPE a failure Reproduce by running git log and press "q". This regressed in master in 5d135d5. [ci skip] --- share/functions/__fish_print_pipestatus.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/functions/__fish_print_pipestatus.fish b/share/functions/__fish_print_pipestatus.fish index 799bb5f78..bc8092076 100644 --- a/share/functions/__fish_print_pipestatus.fish +++ b/share/functions/__fish_print_pipestatus.fish @@ -14,7 +14,8 @@ function __fish_print_pipestatus --description "Print pipestatus for prompt" set -e argv[1 2 3 4 5] # Only print status codes if the job failed. - if test $last_status -ne 0 + # SIGPIPE (141 = 128 + 13) is usually not a failure, see #6375. + if test $last_status -ne 0 && test $last_status -ne 141 set -l sep (set_color normal){$brace_sep_color}{$separator}(set_color normal){$status_color} set -l last_pipestatus_string (string join "$sep" (__fish_pipestatus_with_signal $argv)) set -l last_status_string ""