shell: centralize history config and create history dir

Move HISTFILE/HISTSIZE/SAVEHIST/HISTFILESIZE/HISTCONTROL into the shared
shell/exports as env vars; each shell ignores the other's name-specific
ones. Dedup that can't be an env var stays per-shell: HISTCONTROL=ignoreboth
for bash, setopt hist_ignore_all_dups/hist_ignore_space for zsh.

Also mkdir -p the HISTFILE parent in shell/interactive, so a fresh host
doesn't silently drop history when ~/.cache/shell is absent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 11:49:55 +02:00
parent 634f4950f0
commit ad5a6c98ea
4 changed files with 16 additions and 5 deletions
+2 -1
View File
@@ -10,7 +10,8 @@
# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob;
# Append to the Bash history file, rather than overwriting it
# Append to the Bash history file, rather than overwriting it.
# (HISTFILE/HISTSIZE/HISTFILESIZE/HISTCONTROL come from ~/.config/shell/exports.)
shopt -s histappend;
# Autocorrect typos in path names when using `cd`