I use Arch Linux and bash. I've identified the following and can't understand how it works.
The first issue is:
history -cw doesn't clear ~/.bash_history file but history -c ; history -w does.
The second one is:
When I open the shell and execute something like these:
$ first $ second $ history -c $ third and close the shell, ~/.bash_history is supplemented with a line third. I expect ~/.bash_history to contain the single line third.
My shopt histappend is off, doesn't this mean that the history file needs to be overwritten? It's not critical for me, but I want to understand how it works.