# typing the command.
#
# Thanks to Vadim Zeitlin <vz-zsh@zeitlins.org> for a fix (--) so lines
-# starting with - don't cause errors.
+# starting with - don't cause errors; and to Nadav Har'El
+# <nyh@math.technion.ac.il> for a fix (-r) to handle whitespace/quotes
+# correctly, both on the Zsh mailing list.
TRAPINT() {
# Store the current buffer in the history.
- zle && print -s -- $BUFFER
+ zle && print -s -r -- $BUFFER
# Return the default exit code so Zsh aborts the current command.
return $1