1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-11 04:20:01 +01:00

Fix handling of interrupt in two completion widgets.

This commit is contained in:
Bart Schaefer 2001-06-21 10:05:19 +00:00
parent 5470c1fe38
commit ef89be124d
3 changed files with 7 additions and 2 deletions

@ -7,6 +7,10 @@
* 15018: Completion/compinit: Fix exit status of compdef.
* 15002: Completion/Base/Widget/_complete_debug,
Completion/Base/Widget/_complete_help: Use `trap' to restore state
properly in case of keyboard interrupt.
2001-06-20 Bart Schaefer <schaefer@zsh.org>
* 14880: Completion/Base/Core/_main_complete: Fix insert-tab style

@ -7,7 +7,7 @@ local tmp=${TMPPREFIX}${$}${words[1]:t}$[++_debug_count]
local w="${(qq)words}"
exec 3>&- # Too bad if somebody else is using it ...
[[ -t 2 ]] && exec 3>&2 2>| $tmp
[[ -t 2 ]] && { exec 3>&2 2>| $tmp ; trap 'exec 2>&3 3>&-' EXIT INT }
setopt xtrace
_main_complete
@ -19,7 +19,6 @@ unsetopt xtrace
_message -r "Trace output left in $tmp (up-history to view)"
[[ $compstate[nmatches] -le 1 && $compstate[list] != *force* ]] &&
compstate[list]='list force messages'
exec 2>&3 3>&-
}
return ret

@ -35,10 +35,12 @@ _complete_help() {
builtin zstyle "$@"
fi
}
trap 'unfunction compadd zstyle' EXIT INT
_main_complete
unfunction compadd zstyle
trap - EXIT INT
for i in "${(@ok)help_funcs}"; do
text="${text}