bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: command history


From: Chris F.A. Johnson
Subject: Re: command history
Date: Fri, 24 Feb 2006 16:03:46 -0500 (EST)

On Fri, 17 Feb 2006, mwild@student.ethz.ch wrote:

hi everybody

this is my first post, and i'm not sure whether it even belongs here...

is it the shell which handles the command history? if so, here my
feature request: it would be very convenient, to be able and narrow down
the search in the command history by typing a few characters, instead of
having to scroll through the whole thing.

or is it already there, without me knowing how to switch it on?

      There are (at least) two methods of narrowing the history search.
      One is on by default: incremental search with Ctrl-R.

      The other, history-search-backward, is not bound to any key. Type
      one or more characters and bash searches for commands beginning
      with the letters you have already typed.

      I use this in my ~/.inputrc file:

"\e[a": history-search-backward  ## shift+up-arrow
"\e[b": history-search-forward   ## shift+down-arrow

      You may need to adjust the bindings for your terminal.

--
     Chris F.A. Johnson                      <http://cfaj.freeshell.org>
     ===================================================================
     Author:
     Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]