# easily retrieved later and then abort like ^C normally does. This is useful
# when I want to abort an command to do something in between and then finish
# typing the command.
+#
+# Thanks to Vadim Zeitlin <vz-zsh@zeitlins.org> for a fix (--) so lines
+# starting with - don't cause errors.
TRAPINT() {
# Store the current buffer in the history.
- zle && print -s $BUFFER
+ zle && print -s -- $BUFFER
# Return the default exit code so zsh aborts the current command.
return $1