Move history config to partial

This commit is contained in:
Paweł Płazieński 2024-03-03 13:06:37 +01:00
parent b7d2c76aba
commit 0e7c2e30b8
2 changed files with 17 additions and 18 deletions

17
zsh.d/50_history.zsh Normal file
View File

@ -0,0 +1,17 @@
# vim: ft=zsh
setopt append_history # Allow multiple terminal sessions to all append to one zsh command history
setopt extended_history # save timestamp of command and duration
setopt inc_append_history # Add comamnds as they are typed, don't wait until shell exit
setopt hist_expire_dups_first # when trimming history, lose oldest duplicates first
setopt hist_ignore_dups # Do not write events to history that are duplicates of previous events
setopt hist_ignore_space # remove command line from history list when first character on the line is a space
setopt hist_find_no_dups # When searching history don't display results already cycled through twice
setopt hist_reduce_blanks # Remove extra blanks from each command line being added to history
setopt hist_verify # don't execute, just expand history
setopt share_history # imports new commands and appends typed commands to history
setopt hist_no_store # remove the history (fc -l) command from the history when invoked.
export HISTFILE=$HOME/.zsh_history
export HISTSIZE=1000000
export SAVEHIST=1000000

18
zshrc
View File

@ -142,24 +142,6 @@ zle -N predict-off
bindkey "^Z" predict-on # C-z
bindkey "^X^Z" predict-off # C-x C-z
#---------------------------------- History -----------------------------------
setopt append_history # Allow multiple terminal sessions to all append to one zsh command history
setopt extended_history # save timestamp of command and duration
setopt inc_append_history # Add comamnds as they are typed, don't wait until shell exit
setopt hist_expire_dups_first # when trimming history, lose oldest duplicates first
setopt hist_ignore_dups # Do not write events to history that are duplicates of previous events
setopt hist_ignore_space # remove command line from history list when first character on the line is a space
setopt hist_find_no_dups # When searching history don't display results already cycled through twice
setopt hist_reduce_blanks # Remove extra blanks from each command line being added to history
setopt hist_verify # don't execute, just expand history
setopt share_history # imports new commands and appends typed commands to history
setopt hist_no_store # remove the history (fc -l) command from the history when invoked.
export HISTFILE=~/.zsh_history
export HISTSIZE=1000000
export SAVEHIST=1000000
#---------------------------------- Aliases ----------------------------------
# Use interactive sudo instead of su