Add to .zshrc
file for reverse-i-search
on command history:
export HISTFILE=~/.zsh_history
export HISTSIZE=1000000
export SAVEHIST=1000000
setopt INC_APPEND_HISTORY
setopt HIST_FIND_NO_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
export HISTFILE
— Location of history file
export HISTSIZE
— Size of the history file to be kept on disk (number of lines)
export SAVEHIST
— Size of the history file to be kept in RAM for faster searches (has no performance impact on modern hardware)
NC_APPEND_HISTORY
— Append commands to the shell history immediately, rather than on exit
HIST_FIND_NO_DUPS
— Will skip duplicates when using arrow keys to navigate recent commands
HIST_IGNORE_ALL_DUPS
— Will not append duplicate commands to the history file
HIST_IGNORE_SPACE
— Will not append a command that begins with a space to the history file, for example ` export ENV_VAR=”XXXXXXXXXX”`