“Oops, I just typed my password to the command-line!”
Yes. It happened to me. It was even the root-password. And since I feel unconfortable with that in a file on my disk, here is what I did to get rid of it:
In this case a simple “history -r” should do it, since it has not been written to disk, yet. I would log out & in after that and check in ”~/.bash_history” just to be sure.