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:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user