From ee2dac70dbd0d307e2178605c161690b22a709af Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 11 Sep 2024 19:49:03 +0100 Subject: [PATCH] Only migrate histfile if target doesn't exist --- zshenv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshenv b/zshenv index 7862607..a8dda97 100644 --- a/zshenv +++ b/zshenv @@ -16,7 +16,7 @@ HISTSIZE=20000 SAVEHIST=20000 # Migrate histfile from cache to state directory -[ -f $HOME/.cache/zsh/histfile ] && \ +! [ -f $HISTFILE ] && [ -f $HOME/.cache/zsh/histfile ] && \ mv $HOME/.cache/zsh/histfile \ ${XDG_STATE_HOME:-$HOME/.local/state}/zsh/histfile