ignore duplicates when browsing bash history Assum I have the following command history:


A
B
B


When pressing the up arrow on most linux terminals this would cycle like:


B
A


On osx terminal however it got me:


B
B
A


How can I regain the former behaviour?
Adding 

export HISTCONTROL=ignoreboth:erasedups


to ~/.bash_profile worked for me.