Add ZSH history ignoring à la bash

This commit is contained in:
Talia 2021-02-18 10:43:11 +01:00
parent 926a35baf3
commit 156d8959e3

15
zshrc
View file

@ -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