From cc7ae030708307c1e74bc4a637525d3d43b40f66 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 11 Dec 2019 09:46:40 +0100 Subject: [PATCH] prompt: don't consider SIGPIPE a failure [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 b9f90e4f7..c860821b4 100644 --- a/share/functions/__fish_print_pipestatus.fish +++ b/share/functions/__fish_print_pipestatus.fish @@ -7,7 +7,8 @@ function __fish_print_pipestatus --description "Print pipestatus for prompt" set -e argv[1 2 3 4 5] # only output status codes if some process in the pipe failed - if string match -qvr '^0$' $argv + # SIGPIPE (141 = 128 + 13) is usually not a failure, see #6375. + if string match -qvr '^(0|141)$' $argv 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)) printf "%s%s%s%s%s%s%s%s%s%s" (set_color normal )$brace_sep_color $left_brace \