From: Simon Ruderich Date: Mon, 5 Apr 2010 12:59:11 +0000 (+0200) Subject: zsh/rc: Handle whitespace/quotes correctly when aborting commands. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=817179a8ad182e22b0aecf883926982743e0f26b;p=config%2Fdotfiles.git zsh/rc: Handle whitespace/quotes correctly when aborting commands. --- diff --git a/zsh/rc b/zsh/rc index ef32525..6fcc820 100644 --- a/zsh/rc +++ b/zsh/rc @@ -417,10 +417,12 @@ zstyle ':completion:*:(hg|git)*:*' ignore-line yes # typing the command. # # Thanks to Vadim Zeitlin for a fix (--) so lines -# starting with - don't cause errors. +# starting with - don't cause errors; and to Nadav Har'El +# 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