From 156d8959e3f94b2ff9e9347b0d5e015ffe70d1db Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 18 Feb 2021 10:43:11 +0100 Subject: [PATCH] =?UTF-8?q?Add=20ZSH=20history=20ignoring=20=C3=A0=20la=20?= =?UTF-8?q?bash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zshrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zshrc b/zshrc index 31de64b..a9a3108 100644 --- a/zshrc +++ b/zshrc @@ -1,4 +1,14 @@ +export SAVEHIST=10 +export HISTFILE=$HOME/.zsh_history +export HISTFILESIZE=10000 +export HSITSIZE=10000 + +setopt inc_append_history +setopt extended_history +setopt hist_find_no_dups +# setopt hist_ignore_all_dups setopt prompt_subst +setopt hist_ignore_space prompt='%(?.%F{green}.%F{red})λ%f ' export PROMPT_full='%B%F{magenta}%n%F{blue}@%F{magenta}%m%b %F{magenta}%~ @@ -10,6 +20,11 @@ export PROMPT_gitlong='$(gitprompt && echo -ne " ")%F5$(git log --oneline --no-d # export PS1nogit= # export PS1git= +export HISTORY_IGNORE='(ls|vimswitch|clear)*' +zshaddhistory() { + [[ $1 != ${~HISTORY_IGNORE} ]] +} + export PROMPT=$PROMPT_full prompt() { case $1 in