I use my .bash_history all the time using ctrl-R to find complex commands I figured out in the past and since forgot how to run.
I have a large history (50,000) lines, managed by these commands in my .bashrc file. This was certainly copied from someone on the internet in years past:
#for keeping the history from all shells export HISTIGNORE=lst:df*:top:ssh*:cd* # don't put these in history export HISTCONTROL=erasedups # no duplicate entries export HISTSIZE=50000 # big big history shopt -s histappend # append to history, don't overwrite it # Save and reload the history after each command finishes export PROMPT_COMMAND="history -a; history -r; $PROMPT_COMMAND"
Now, my problem is that with a huge history, I notice my prompt getting a bit laggy. If I nuke my .bash_history things get snappy again. I notice I have a lot of crud in my .bash_history, but manually curating it is not worth the time.
Who has a suggestion to allow me to keep my .bash_history dependance, but to speed up my prompt?