blob: 5beb7eca64c2eb434c08e854cb6b1ef4afcd38d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
http://www.zsh.org/mla/workers/2014/msg01191.html
diff --git a/Completion/Base/Utility/_call_program b/Completion/Base/Utility/_call_program
index b657648..010e094 100644
--- a/Completion/Base/Utility/_call_program
+++ b/Completion/Base/Utility/_call_program
@@ -2,8 +2,8 @@
local tmp err_fd=-1
-if (( ${debug_fd:--1} > 2 ))
-then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is log file
+if (( ${debug_fd:--1} > 2 )) || [[ ! -t 2 ]]
+then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is trace or redirect
else exec {err_fd}>/dev/null
fi
--
|