help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HISTCONTROL doesn't erase dups


From: NBaH
Subject: HISTCONTROL doesn't erase dups
Date: Mon, 19 Jan 2026 23:10:17 +0100
User-agent: Mozilla Thunderbird

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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]