OK, seems there have been a few somewhat similar questions. The answer is to use:
(It seems to be using glob syntax, and multiple patterns can be given by separating with colons
Another way is to set:
which will cause Bash to keep all commands starting with a space out of the history. So if you can get into the habit of typing space-
rm-whatever this will work fine.
To keep both space-commands and duplicate commands out of the history, you can do:
It's also possible to use both