diff --git a/home/user/.config/bash/export b/home/user/.config/bash/export index 33ac3ba..4ab1edc 100644 --- a/home/user/.config/bash/export +++ b/home/user/.config/bash/export @@ -9,8 +9,8 @@ export LESS="-nMiSRx4 -# 1 -+X -+F" export CDPATH=:~:~/code -export HISTSIZE=10000 -export HISTFILESIZE=10000 +export HISTSIZE=100000 +export HISTFILESIZE="$HISTSIZE" export HISTCONTROL=ignoreboth:erasedups export HISTTIMEFORMAT="%F %T " export HISTIGNORE="&:l[lsa\.]:[bf]g:exit:q:clear:c:history:h" diff --git a/home/user/.config/zsh/history b/home/user/.config/zsh/history index ac2a0fb..d9e6311 100644 --- a/home/user/.config/zsh/history +++ b/home/user/.config/zsh/history @@ -1,14 +1,16 @@ # History configurations -export HISTFILE=~/.zsh_history -export HISTSIZE=10000 -export SAVEHIST=20000 -setopt HIST_IGNORE_SPACE -setopt HIST_FIND_NO_DUPS -setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE -setopt hist_ignore_dups # ignore duplicated commands history list -setopt hist_ignore_space # ignore commands that start with space -setopt hist_verify # show command with history expansion to user before running it +export HISTFILE="$HOME/.zsh_history" +export HISTSIZE=100000 +export SAVEHIST=$HISTSIZE +setopt HIST_VERIFY # Don't execute immediately upon history expansion. +setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits. +setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format. +setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history. +setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate. +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 ..)' @@ -21,4 +23,4 @@ zshaddhistory() { ## should use EXTENDED_GLOB syntax setopt extendedglob [[ ${1::-1} != ${~HISTORY_IGNORE} ]] -} +} \ No newline at end of file