From 647db2586be6478d0892fc20994135d748460a80 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 14 Oct 2012 21:58:19 +0200 Subject: [PATCH] zsh/rc: Ctrl-C doesn't store the line if histignorespace applies. --- zsh/rc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zsh/rc b/zsh/rc index 55e9242..be8e8f5 100644 --- a/zsh/rc +++ b/zsh/rc @@ -601,6 +601,12 @@ bindkey '^F' complete-files # for a fix (-r) to handle whitespace/quotes # correctly, both on the Zsh mailing list. TRAPINT() { + # Don't store this line in history if histignorespace is enabled and the + # line starts with a space. + if [[ -o histignorespace && ${BUFFER[1]} = " " ]]; then + return $1 + fi + # Store the current buffer in the history. zle && print -s -r -- $BUFFER -- 2.44.2