summary refs log tree commit diff
path: root/Completion/Base/Utility
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-10-09 17:54:47 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-10-09 17:54:47 -0700
commit22c4ea424ce2e8febce04d324c5ec9898f5d534b (patch)
tree9da725eba405fdad1256e0234731635ca64816d1 /Completion/Base/Utility
parenta03227de23f623370ab6a6eaf8d22e8d9b1a3aae (diff)
downloadzsh-22c4ea424ce2e8febce04d324c5ec9898f5d534b.tar.gz
zsh-22c4ea424ce2e8febce04d324c5ec9898f5d534b.tar.xz
zsh-22c4ea424ce2e8febce04d324c5ec9898f5d534b.zip
33403: be conservative about redirecting _call_program stderr, the caller may have already done so
Diffstat (limited to 'Completion/Base/Utility')
-rw-r--r--Completion/Base/Utility/_call_program4
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Base/Utility/_call_program b/Completion/Base/Utility/_call_program
index b65764827..010e09476 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