I set export HISTSIZE=99999999999999
but is that the best way? I don't know if an overflow might occur. I'm looking for a tested, reliable way to remove command history limits.
How to get infinite command history in bash
bashhistory
bashhistory
I set export HISTSIZE=99999999999999
but is that the best way? I don't know if an overflow might occur. I'm looking for a tested, reliable way to remove command history limits.
Best Answer
it is indeed not (well) documented and I guess 99% of the bash user on this planed do set HISTSIZE to a veeery large number.
In the GNU bash history is handled through the mighty readline library. The library has the option to limit the history size ("stifle" in readline jargon) or not and bash simply sets the readline history to stifled/unstifled. If you look into e.g. GNU bash version 4.2, file variables.c, line 4443, function void sv_histsize (char*) you'll find this comment (and the whole stifling/unstifling in the function that follows):
So this should do the trick:
And also this (if you feel defiant):
Hope this helps.