Add ZSH history ignoring à la bash
This commit is contained in:
parent
926a35baf3
commit
156d8959e3
1 changed files with 15 additions and 0 deletions
15
zshrc
15
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 prompt_subst
|
||||||
|
setopt hist_ignore_space
|
||||||
|
|
||||||
prompt='%(?.%F{green}.%F{red})λ%f '
|
prompt='%(?.%F{green}.%F{red})λ%f '
|
||||||
export PROMPT_full='%B%F{magenta}%n%F{blue}@%F{magenta}%m%b %F{magenta}%~
|
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 PS1nogit=
|
||||||
# export PS1git=
|
# export PS1git=
|
||||||
|
|
||||||
|
export HISTORY_IGNORE='(ls|vimswitch|clear)*'
|
||||||
|
zshaddhistory() {
|
||||||
|
[[ $1 != ${~HISTORY_IGNORE} ]]
|
||||||
|
}
|
||||||
|
|
||||||
export PROMPT=$PROMPT_full
|
export PROMPT=$PROMPT_full
|
||||||
prompt() {
|
prompt() {
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
Loading…
Reference in a new issue