summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xranger/data/scope.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh
index 3a6504dd..c997726a 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -33,6 +33,8 @@ extension=${path##*.}
 function have { type -P "$1" > /dev/null; }
 # "success" returns the exit code of the first program in the last pipe chain
 function success { test ${PIPESTATUS[0]} = 0; }
+# wraps highlight to treat exit code 141 (killed by SIGPIPE) as success
+function highlight { command highlight "$@"; test $? = 0 -o $? = 141; }
 
 case "$extension" in
 	# Archive extensions: