From 0a750c54f9c4c9b697f4fbe4e337ce78c74111c7 Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Tue, 10 Jun 2025 10:48:25 +0200 Subject: [PATCH] Improve history handling for zsh --- .zshrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.zshrc b/.zshrc index 7165c5f..3f36d4d 100644 --- a/.zshrc +++ b/.zshrc @@ -13,11 +13,19 @@ case "$0" in -*) esac HISTFILE=~/.zsh_history +# History in the file HISTSIZE=10000 +# History in RAM SAVEHIST=10000 setopt appendhistory setopt SHARE_HISTORY +# Self-explanatory setopt hist_ignore_space +setopt hist_ignore_dups +# Remove older duplicates first +setopt hist_expire_dups_first +# Store timestamps +setopt EXTENDED_HISTORY export EDITOR=vim # Noticing this EDITOR setting, zsh will default to vim keybindings. No thanks.