From 1452bfe1017cf83889919d561d3046c1b9ba1fb5 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Fri, 12 May 2000 02:31:05 +0000 Subject: 11332: Test descriptors correctly for redirect/restore of stderr; plus an aesthetic tweak. --- Completion/Commands/_complete_debug | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Completion') diff --git a/Completion/Commands/_complete_debug b/Completion/Commands/_complete_debug index be3f7672f..cbbe41e43 100644 --- a/Completion/Commands/_complete_debug +++ b/Completion/Commands/_complete_debug @@ -5,8 +5,9 @@ unsetopt markdirs globsubst shwordsplit nounset ksharrays (( $+_debug_count )) || integer -g _debug_count local tmp=${TMPPREFIX}${$}${words[1]:t}$[++_debug_count] -local w="${(qqq)words}" +local w="${(qq)words}" +exec 3>&- # Too bad if somebody else is using it ... [[ -t 2 ]] && exec 3>&2 2>| $tmp setopt xtrace @@ -14,7 +15,7 @@ _main_complete integer ret=$? unsetopt xtrace -[[ -t 2 ]] || { +[[ -t 3 ]] && { ## Calling "print -s" during completion is presently broken. # _message -r "Trace output left in $tmp (up-history to view)" # print -sR "${VISUAL:-${EDITOR:-${PAGER:-more}}} $tmp ;: $w" -- cgit 1.4.1