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.
This commit is contained in:
2021-01-07 09:49:37 +01:00
parent f4950002b8
commit 555e983d1f

View File

@@ -1,5 +1,7 @@
HISTSIZE=1000000 HISTSIZE=1000000
SAVEHIST=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 if [[ ! -d "${XDG_DATA_HOME:-$HOME/.local/share}"/zsh ]]; then
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}"/zsh mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}"/zsh