I am having a lot of trouble setting up the terminal history of Bash the way I want. I would like to have no duplicate entries and if I enter a command I want it saved and the duplicates above removed.
The problem is the history
command shows me it is functioning the way I want, but once I log out the duplicates come back again. I believe it is just appending the history to the existing one. I have these lines in my .bashrc
file:
HISTCONTROL=ignoreboth:erasedups
shopt -u histappend
I have even tried uncommenting shopt
, but it still appends the history on logout. How can I have the history be exactly how it is before I logout?