diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2000-05-12 02:31:05 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2000-05-12 02:31:05 +0000 |
commit | 1452bfe1017cf83889919d561d3046c1b9ba1fb5 (patch) | |
tree | 6f13d0ef367fe905ad85d166c8c9b86ba403621e /Completion | |
parent | 0768b190ba9347bcfe2d43da2b61eded53173635 (diff) | |
download | zsh-1452bfe1017cf83889919d561d3046c1b9ba1fb5.tar.gz zsh-1452bfe1017cf83889919d561d3046c1b9ba1fb5.tar.xz zsh-1452bfe1017cf83889919d561d3046c1b9ba1fb5.zip |
11332: Test descriptors correctly for redirect/restore of stderr; plus an
aesthetic tweak.
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Commands/_complete_debug | 5 |
1 files changed, 3 insertions, 2 deletions
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" |