diff options
| author | Peter Stephenson <pws@zsh.org> | 2014-12-05 17:06:28 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@zsh.org> | 2014-12-05 17:06:28 +0000 |
| commit | b4a198cdda3d499af4e2b4f4a2279f98c8d07433 (patch) | |
| tree | 86e8cbecffba66db5683f222982f877d20fda385 | |
| parent | 33841: explain array append a bit better (diff) | |
| download | zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar.gz zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar.bz2 zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar.lz zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar.xz zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar.zst zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.zip | |
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.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | Completion/Base/Core/_main_complete | 7 |
2 files changed, 10 insertions, 2 deletions
@@ -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 diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete index fcd63664e..91b68fe5d 100644 --- a/Completion/Base/Core/_main_complete +++ b/Completion/Base/Core/_main_complete @@ -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. |
