hi,
shouldn't
HISTCONTROL=ignoreboth:erasedups
first, not store "contiguous" identical commands
then, not store command beginning with a space
and, remove previous same command in the history file
?
for weeks now, my HISTFILE is filling with the same commands I use most.
history doesn't keep these commands, but when I exit and reopen a
terminal, commands have been added to HISTFILE, and of course to history.
for example, with a fresh and clean HISTFILE, I open a terminal :
no history
I enter
echo foo
echo bar
I close terminal, and open a new one :
history is
echo foo
echo bar
I go back and redo both commands
history doesn't change
I close terminal, and open a new one :
history is
echo foo
echo bar
echo foo
echo bar
--
if it matters, I'm using Arch.
and Ctrl-x Ctrl-v gives
GNU bash, version 5.3.9(1)-release (x86_64-pc-linux-gnu)