X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=f696a34f16efa20fe5bbf7d4c5c708e41ed498c5;hb=7462c890fb0ddcd28654e06ff8f8d378854a4f12;hp=55e92424562027b001676243b47ea43594cc8aa3;hpb=c4e301f244c36103c028cf5067fdd8844aa3dbe6;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 55e9242..f696a34 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 @@ -618,6 +624,8 @@ alias sudo='sudo ' # Global aliases for often used redirections. alias -g E='2>&1' +alias -g N='>/dev/null' +alias -g EN='2>/dev/null' alias -g L='2>&1 | less' alias -g LS='2>&1 | less -S' # -S prevents wrapping of long lines alias -g D='2>&1 | colordiff | less'