Using Bash's History Effectively →

$HISTIGNORE looks to be incredibly useful. Via Simon Willison, whose readers supply more tips in the comments.