export HISTIGNORE="&:ls:ls -la"
That's for local shell history, I also record every command to a file based archive (see my other comment in this thread: http://news.ycombinator.com/item?id=992772 ).