Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

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.

Tagged ,

5 comments

  1. 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 - #

  2. 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 - #

  3. At last! Someone who unedrstnads! Thanks for posting!

    Meadow - 8th October 2011 15:44 - #

  4. This does look promising. I'll keep coimng back for more.

    Caiya - 10th October 2011 05:56 - #

  5. I will recommend my friends to read this. Bottes UGGI am quite sure they will UGG Pas Cher learn lots of new stuff here than anybody else!

    bottes ugg - 28th October 2011 02:53 - #

Comments are closed.
A django site