Using Bash's History Effectively. The HISTIGNORE environment variable is particularly useful, allowing you to suppress certain commands by specifying a pattern. This article has a tip for causing a command to be omitted from the history if you prefix it with a space.
I have the following in .inputrc
"\e[A": history-search-backward
"\e[B": history-search-forward
This allows me to type the start of a command and then hit up-arrow to autocomplete from history.
Googling indicates it's discussed at http://www.macosxhints.com/article.php?story=20031 026174236860
Mark Fowler - 25th February 2010 12:49 - #
HISTCONTROL=ignorespace will also omit space-prefixed commands from the history. I use HISTCONTROL=ignoreboth to suppress duplicates too.
Of course HISTIGNORE is strictly more powerful. Maybe I should try it: interesting.
Robin Houston - 25th February 2010 13:03 - #