From 4284406640109d46009bb6350ef06223731dd373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 12 Sep 2021 11:03:42 +0200 Subject: [PATCH] Move the history file to the data dir --- .config/zsh/.zprofile | 1 + .zshenv | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index bded335..f21830c 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -1,4 +1,5 @@ # create the missing directories +[ ! -d "$HISTFILE_DIR" ] && mkdir -p "$HISTFILE_DIR" [ ! -d "$COMPDIR" ] && mkdir -p "$COMPDIR" # transmission diff --git a/.zshenv b/.zshenv index 4cb2645..7272d94 100644 --- a/.zshenv +++ b/.zshenv @@ -2,7 +2,8 @@ export ZDOTDIR="$HOME/.config/zsh" # History -export HISTFILE="$HOME/.config/zsh/.zsh_history" +export HISTFILE_DIR="$HOME/.local/share/zsh/.zsh_history" +export HISTFILE="$HISTFILE_DIR/.zsh_history" export HISTSIZE=5000 export SAVEHIST=100000