From 2e3694daf1b1141bc093a3ff000987b746d4d59a Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:17:51 +0100 Subject: [PATCH] Better history handling with multiple sessions --- dot_zshrc.tmpl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 608aef2..c759c39 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -53,11 +53,9 @@ alias grep='grep --color' # History # --------------------------------------------------------------------------- -# Allow multiple sessions to append to one Zsh command history. -setopt APPEND_HISTORY - -# Write to the history file immediately, not when the shell exits. -setopt INC_APPEND_HISTORY +setopt APPEND_HISTORY # Append commands to the history file when a session ends +unsetopt INC_APPEND_HISTORY # Avoid appending commands immediately after execution +unsetopt SHARE_HISTORY # Keep history isolated to each session during runtime # --------------------------------------------------------------------------- # Git