Only tangentially related, but if you prefix the command with a space, it doesn't get recorded to history.
$ cd
$ echo "one"
one
$ echo "two"
two
$ echo "three"
three
$ history | tail -3
10089 cd
10090 echo "one"
10091 echo "three"
When you remember to do it, that is.