From 6a86deef8735944032758b43e3ac5bdd2f04d1a6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 16 Nov 2021 12:18:39 +0100 Subject: [PATCH] zsh: Fix shell history settings For the longest time, shell history ignore was set to the bash version of the setting. Zsh uses both a different variable and a different format to ignore various commands in the history. Additionally increased the history size one order of magnitude, so we really don't lose anything. Should still be fine for personal computing work anyway. --- zsh/.config/zsh/.zshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 9f54b3d..62be501 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -118,10 +118,10 @@ setopt inc_append_history_time # append command to history file immediately afte setopt share_history # Share your history across all your terminal windows setopt pushd_ignore_dups #setopt pushd_silent -export HISTSIZE=100000 -export SAVEHIST=100000 +export HISTSIZE=1000000 +export SAVEHIST=1000000 export HISTFILE="$XDG_DATA_HOME/zsh_history" -export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help" +export HISTORY_IGNORE="(jrnl *|l *|ls *|z *|cd *|cd -|pwd|pwd *|exit|date)" ## Set ZSH History aliases # Show the top 5 commands used in recent history