-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve history to not get lost
- Loading branch information
1 parent
abe7855
commit 857a11e
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |