Files
dotfiles/.config/zsh/zshrc.d/70-history.zsh
druckdev 555e983d1f zsh: Fix truncation of history by bash
As bash uses some environment variables with the same name as zsh it
uses the same history file and potentially truncates it, when there is
no bashrc.
2021-01-07 09:49:37 +01:00

10 lines
310 B
Bash

HISTSIZE=1000000
SAVEHIST=1000000
# Keep bash from truncating zsh's history if there is no bashrc
export HISTFILESIZE=1000000
if [[ ! -d "${XDG_DATA_HOME:-$HOME/.local/share}"/zsh ]]; then
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}"/zsh
fi
HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}"/zsh/zsh_history