sh history

This commit is contained in:
thek4n 2024-03-22 23:21:36 +03:00
parent 5d8c1f4432
commit 6787c56f33
2 changed files with 14 additions and 12 deletions

View File

@ -9,8 +9,8 @@ export LESS="-nMiSRx4 -# 1 -+X -+F"
export CDPATH=:~:~/code export CDPATH=:~:~/code
export HISTSIZE=10000 export HISTSIZE=100000
export HISTFILESIZE=10000 export HISTFILESIZE="$HISTSIZE"
export HISTCONTROL=ignoreboth:erasedups export HISTCONTROL=ignoreboth:erasedups
export HISTTIMEFORMAT="%F %T " export HISTTIMEFORMAT="%F %T "
export HISTIGNORE="&:l[lsa\.]:[bf]g:exit:q:clear:c:history:h" export HISTIGNORE="&:l[lsa\.]:[bf]g:exit:q:clear:c:history:h"

View File

@ -1,14 +1,16 @@
# History configurations # History configurations
export HISTFILE=~/.zsh_history export HISTFILE="$HOME/.zsh_history"
export HISTSIZE=10000 export HISTSIZE=100000
export SAVEHIST=20000 export SAVEHIST=$HISTSIZE
setopt HIST_IGNORE_SPACE setopt HIST_VERIFY # Don't execute immediately upon history expansion.
setopt HIST_FIND_NO_DUPS setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt hist_ignore_dups # ignore duplicated commands history list setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt hist_ignore_space # ignore commands that start with space setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt hist_verify # show command with history expansion to user before running it setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
export HISTORY_IGNORE='(cd|c|q|exit|l[sal.]|[bf]g#( *)#|..|lsl|ll[a.]|cd ..)' export HISTORY_IGNORE='(cd|c|q|exit|l[sal.]|[bf]g#( *)#|..|lsl|ll[a.]|cd ..)'