From fa94c7d878d8461b4911662ea953d34ec0b17cb9 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Mon, 20 May 2024 09:05:30 +0200 Subject: [PATCH] fix(zsh): macos history retention --- zshenv | 4 ---- zshrc | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/zshenv b/zshenv index e6dd7e8..f67177f 100644 --- a/zshenv +++ b/zshenv @@ -10,10 +10,6 @@ export BROWSER=firefox # ZSH: export ZDOTDIR="$XDG_CONFIG_HOME/zsh" -export HISTFILE="$ZDOTDIR/.zsh_history" -export HISTSIZE=100000 -export SAVEHIST=100000 -export HISTTIMEFORMAT="[%F %T] " # UI # `vivid generate molokai` diff --git a/zshrc b/zshrc index 70802a1..7e9685b 100644 --- a/zshrc +++ b/zshrc @@ -1,6 +1,13 @@ # $HOME/.config/zsh/.zshrc # Note: Install zsh-completions package +# Moved from zshenv because they were being inexplicably overwritten or ignored +# on Macos: +export HISTFILE="$ZDOTDIR/.zsh_history" +export HISTSIZE=100000 +export SAVEHIST=100000 +export HISTTIMEFORMAT="[%F %T] " + setopt hist_find_no_dups setopt extended_history setopt share_history