Append default history to per-pane histfile

This commit is contained in:
Daniel McKnight 2026-05-08 17:15:08 -07:00
parent d241365b88
commit 566fe1d486

5
.zshrc
View file

@ -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