From ae8c1c96801747677a1cc61535c81ba349016126 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 16 Feb 2025 09:27:19 -0600 Subject: [PATCH] move .bash_history to .cache/ Signed-off-by: Jeff Carr --- bashrc/.wit | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bashrc/.wit b/bashrc/.wit index a20afbb..a8cbfa8 100644 --- a/bashrc/.wit +++ b/bashrc/.wit @@ -16,6 +16,19 @@ if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . /etc/bash_completion fi +# Set Bash history file location to ~/.cache/bash_history +export HISTFILE=~/.cache/bash_history + +# Ensure ~/.cache/ exists +mkdir -p ~/.cache + +# Set history size (optional, customize as needed) +export HISTSIZE=10000 +export HISTFILESIZE=20000 + +# Avoid duplicate entries in history +export HISTCONTROL=ignoredups:erasedups + export WIT_BASH=true export WIT_USER=$LC_USER if [ "x$WIT_USER" == "x" ]; then