Problem
Thanks to this question, I succeed to forbid my bash to stock the same command more than one time if I write many times the same command.
However, there is still a detail that I cannot resolve: my prompt contains the \#
special character that print command number for each command. And it still increment itself each time I enter a command, duplicate or not, even if my history doesn't fill up.
Sample
In my ~/.bashrc
, my prompt looks like this:
export PS1='aracthor \# >'
And when I write many times the same command, the command number increment:
aracthor 1 >pwd
/home/aracthor
aracthor 2 >pwd
/home/aracthor
aracthor 3 >
How can I avoid command number it to increment ?
I'm using Ubuntu 14.04.02 and declare -p HISTCONTROL
output is:
declare -x HISTCONTROL="ignoredups:erasedups"
declare -p HISTCONTROL
.HISTCONTROL
. @terdon There is not really an useful goal or a goal at all, I just don't want to see my prompt number incremented on duplicate.