Append default history to per-pane histfile
This commit is contained in:
parent
d241365b88
commit
566fe1d486
1 changed files with 5 additions and 0 deletions
5
.zshrc
5
.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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue