From 566fe1d486e8f334bae025eedd4ae846f3ddb8cb Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Fri, 8 May 2026 17:15:08 -0700 Subject: [PATCH] Append default history to per-pane histfile --- .zshrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zshrc b/.zshrc index a5a62c9..e38a9cb 100644 --- a/.zshrc +++ b/.zshrc @@ -109,6 +109,11 @@ if [ -n "$TMUX_PANE" ]; then hist_dir="${XDG_STATE_HOME:-${HOME}/.local/state}/zsh" [ -d "$hist_dir" ] || mkdir -p "$hist_dir" export HISTFILE="${hist_dir}/histfile.$TMUX_PANE" + + # Ensure some history is defined for the pane for completion + [ -f "$HISTFILE" ] || cp "${HOME}/.histfile" "$HISTFILE" + + # Append to history immediately, rather than waiting for the shell to exit setopt inc_append_history fi