Este é o código real que carrega o histórico (de bashhist.c
na linha 260):
/* Load the history list from the history file. */
void
load_history ()
{
char *hf;
/* Truncate history file for interactive shells which desire it.
Note that the history file is automatically truncated to the
size of HISTSIZE if the user does not explicitly set the size
differently. */
set_if_not ("HISTSIZE", "500");
sv_histsize ("HISTSIZE");
set_if_not ("HISTFILESIZE", get_string_value ("HISTSIZE"));
sv_histsize ("HISTFILESIZE");
/* Read the history in HISTFILE into the history list. */
hf = get_string_value ("HISTFILE");
if (hf && *hf && file_exists (hf))
{
read_history (hf);
using_history ();
history_lines_in_file = where_history ();
}
}
Se os valores de HISTSIZE
e HISTFILESIZE
estiverem definidos, eles serão usados.
Editar
De comentários , readline
foi de fato o culpado. Eu estava procurando (um pouco tolo) em parâmetros funcionais:
there is a variable called history-size that can be read from the inputrc file. that variable sets the maximum number of history entries saved in the history list. I checked it's value in my local inputrc file to found it equal 5000. Setting it to a larger value solved the problem.