0

I'm on Catalina using iterm but I know I've been facing this issue for years. I won't be surprised if this is related to Why is .bash_history periodically wiped? which answer explained why my bash history was behaving the way it is. This issue, however, still needs answers.

My .bashrc has all this related to history including HISTCONTROL=ignoreboth:erasedups:

   HISTFILESIZE=10000
   HISTSIZE=10000
   HISTTIMEFORMAT="%d/%m/%y %T "
   export HISTCONTROL=ignoreboth:erasedups
   shopt -s histappend

Yet I see dups, see the latest sample:

 4637  30/09/22 11:31:53 git checkout master
 4638  30/09/22 11:33:51 git checkout misc15_db-change
 4639  30/09/22 11:33:54 git stash pop
 4640  30/09/22 11:34:04 git add -u
 4641  30/09/22 11:34:10 git diff --staged
 4642  30/09/22 11:31:53 git checkout master
 4643  30/09/22 11:33:51 git checkout misc15_db-change
 4644  30/09/22 11:33:54 git stash pop
 4645  30/09/22 11:34:04 git add -u
 4646  30/09/22 11:37:01 git diff --staged

What's interesting to see here is most of these dups are of the same timestamp with the exception of the last git diff --staged entry, which still shouldn't be there.

0

You must log in to answer this question.

Browse other questions tagged .