Chet Ramey <chet.ra...@case.edu> wrote: > HISTFILESIZE doesn't exist until bash tries to load the history > list from the history file (taken from $HISTFILE). At that point, > if it doesn't have a value, it's set to $HISTSIZE. That doesn't > happen until after the startup files are read, as you guessed. > > If you want to avoid history file truncation, your best bet is > to set HISTFILESIZE to some very large value.
Actually, what I want is to prevent writing to the history file at all when bash exits. (Not all the time, just in certain cases that other logic in .bashrc will be able to detect. Unsetting HISTFILESIZE unconditionally was a simplified test case.) Should I unset HISTFILE, or set it to /dev/null, instead of trying to mess with HISTFILESIZE?