summaryrefslogtreecommitdiff
path: root/shells/zsh/patches/patch-Completion_Base_Utility__call__program
blob: cbbb57481c42d1678709d28f42eb10384370fb1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-Completion_Base_Utility__call__program,v 1.1 2015/02/04 09:22:34 snj 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