$NetBSD: patch-Completion_Base_Utility__call__program,v 1.1.2.2 2015/02/05 18:50:32 tron Exp $

Revision 22c4ea424ce2e8febce04d324c5ec9898f5d534b upstream.

Thix fixes, at the very least, issues with cvs command/filename completion.

--- Completion/Base/Utility/_call_program.orig	2014-09-24 11:03:17.000000000 -0700
+++ Completion/Base/Utility/_call_program	2015-02-04 00:52:56.000000000 -0800
@@ -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
 
