From: Simon Ruderich Date: Tue, 7 Jul 2009 19:50:26 +0000 (+0200) Subject: zsh: Fix TRAPINT to work with lines starting with -. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=356f6b726dcbb38970fc32185280dc69a5930883;p=config%2Fdotfiles.git zsh: Fix TRAPINT to work with lines starting with -. --- diff --git a/zsh/rc b/zsh/rc index 77b9f3c..c95c376 100644 --- a/zsh/rc +++ b/zsh/rc @@ -336,9 +336,12 @@ zstyle ':completion:*:(hg|git)*:*' ignore-line yes # 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 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