2021-02-18 09:43:11 +00:00
|
|
|
export HISTFILE=$HOME/.zsh_history
|
2021-02-26 07:23:22 +00:00
|
|
|
export SAVEHIST=10000
|
2021-02-18 09:43:11 +00:00
|
|
|
export HISTFILESIZE=10000
|
|
|
|
export HSITSIZE=10000
|
|
|
|
|
2021-02-18 14:05:37 +00:00
|
|
|
bindkey -v
|
|
|
|
|
2021-02-26 07:23:22 +00:00
|
|
|
setopt append_history
|
|
|
|
setopt hist_find_no_dups
|
|
|
|
# setopt hist_ignore_dups
|
2021-02-18 09:43:11 +00:00
|
|
|
setopt inc_append_history
|
|
|
|
setopt extended_history
|
|
|
|
setopt hist_find_no_dups
|
|
|
|
# setopt hist_ignore_all_dups
|
2021-02-18 09:12:06 +00:00
|
|
|
setopt prompt_subst
|
2021-02-18 09:43:11 +00:00
|
|
|
setopt hist_ignore_space
|
2021-02-18 09:12:06 +00:00
|
|
|
|
|
|
|
prompt='%(?.%F{green}.%F{red})λ%f '
|
|
|
|
export PROMPT_full='%B%F{magenta}%n%F{blue}@%F{magenta}%m%b %F{magenta}%~
|
|
|
|
'"$prompt"
|
|
|
|
export PROMPT_gitlong='$(gitprompt && echo -ne " ")%F5$(git log --oneline --no-decorate -1 2>/dev/null)
|
|
|
|
%F{cyan}$(gitpath)'"$prompt"
|
|
|
|
# export PS1tiny=
|
|
|
|
# export PS1nano=
|
|
|
|
# export PS1nogit=
|
|
|
|
# export PS1git=
|
|
|
|
|
2021-02-19 07:27:47 +00:00
|
|
|
export HISTORY_IGNORE='(ls|vimswitch|clear)'
|
2021-02-18 09:43:11 +00:00
|
|
|
zshaddhistory() {
|
|
|
|
[[ $1 != ${~HISTORY_IGNORE} ]]
|
|
|
|
}
|
|
|
|
|
2021-02-18 09:12:06 +00:00
|
|
|
export PROMPT=$PROMPT_full
|
|
|
|
prompt() {
|
|
|
|
case $1 in
|
|
|
|
(full)
|
|
|
|
export PROMPT=$PROMPT_full;;
|
|
|
|
(gitlong)
|
|
|
|
export PROMPT=$PROMPT_gitlong;;
|
|
|
|
(*)
|
|
|
|
export PROMPT=$PROMPT_full;;
|
|
|
|
esac
|
|
|
|
export PROMPT_set=$1
|
|
|
|
}
|
|
|
|
prompt $PROMPT_set
|