Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: cvs completion problem in zsh-5.0.7
On Oct 9, 3:07pm, Bernard Cafarelli wrote:
}
} % cvs add new<tab>
} unknown cvs command: add
}
} I ran a git bisect and ended up with 5a2668a6ac1c:
} 33223: discard stderr except when _complete_debug is in progress.
Well, dammit.
The assumption was that 2>&1 would have been passed down to _call_program
for the "eval" that it executes.
In actual practice in several cases it's the call to _call_program ITSELF
that has 2>&1 attached.
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
--
Barton E. Schaefer
Messages sorted by:
Reverse Date,
Date,
Thread,
Author