From 356f6b726dcbb38970fc32185280dc69a5930883 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 7 Jul 2009 21:50:26 +0200 Subject: [PATCH] zsh: Fix TRAPINT to work with lines starting with -. --- zsh/rc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.45.2