Skip to content

Commit

Permalink
feat: improve history to not get lost
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-zarrad committed Jul 26, 2024
1 parent abe7855 commit 857a11e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/zsh_better_history.template.zshrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#PSH_TEMPLATE=END
# History improvements
# Source: https://jdhao.github.io/2021/03/24/zsh_history_setup/
export HISTFILE=~/.histfile # history file location
export HISTSIZE=1000000 # the number of items for the internal history list
export SAVEHIST=1000000 # maximum number of items for the history file
setopt HIST_IGNORE_ALL_DUPS # do not put duplicated command into history list
setopt HIST_SAVE_NO_DUPS # do not save duplicated command
setopt HIST_REDUCE_BLANKS # remove unnecessary blanks
setopt INC_APPEND_HISTORY_TIME # append command to history file immediately after execution
setopt EXTENDED_HISTORY # record command start time

0 comments on commit 857a11e

Please sign in to comment.