1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-06 11:21:22 +02:00

33859: Fix traps in completion

We need to use a function-style trap in order for the effect of the
interrupt to propagate back correctly.
This commit is contained in:
Peter Stephenson 2014-12-05 17:06:28 +00:00
parent 231cbbc5b1
commit b4a198cdda
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2014-12-05 Peter Stephenson <p.stephenson@samsung.com>
* 33859 with typo fix: Completion/Base/Core/_main_complete: to
propagate signal from trap we need to use function style.
2014-12-04 Barton E. Schaefer <schaefer@zsh.org>
* 33841: Doc/Zsh/params.yo: explain array append a bit better

View file

@ -128,8 +128,11 @@ _completer_num=1
# We assume localtraps to be in effect here ...
integer SECONDS=0
trap 'zle -M "Killed by signal in ${funcstack[1]} after ${SECONDS}s";
zle -R; return 130' INT QUIT
TRAPINT TRAPQUIT() {
zle -M "Killed by signal in ${funcstack[1]} after ${SECONDS}s";
zle -R
return 130
}
# Call the pre-functions.