How do I edit bash shell terminal history? I entered a password in a command line pro or in a terminal window by mistake and do not want to remove my whole history. My shell is bash.
How do I edit my bash history in Mac OS X?
Editing the .bash_history is just a matter of opening the file with an editor. There are a couple of ways you could achieve this.

In the Terminal just type vi ~/.bash_history, then edit the file as you want, and save. This option could be tricky, if you're not used to vi, of course.
Make the file visible by following these instructions, for instance, open it as any other file, modify it, and save.
In the Terminal just type open -e ~/.bash_history. This command will open the file with TextEdit, you can choose any other text editor, of course. Modify the file and save.

For the changes to be noticeable just restart the bash.