X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=be8e8f5c39e0c9043c24368877d42d258fa2216b;hb=03acd3d7c7b6b4493e51aeba92690c5d6119d079;hp=55e92424562027b001676243b47ea43594cc8aa3;hpb=c4e301f244c36103c028cf5067fdd8844aa3dbe6;p=config%2Fdotfiles.git 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