Change setting of arrow keys for history in BASH (Fedora Core 2 Wishlist)

Jaap A. Haitsma jaap at haitsma.org
Sat Dec 13 18:21:47 UTC 2003


I can understand that for historical reasons you want to keep it like
that, but then again if you never change something there will never be
progress ;-). Anyway whatever the RedHat people decide it's fine by me,
because I can just change it myself

BTW ctrl-R is not exactly the same as history-search-backward, because
it's bound to reverse-search-history instead of history-search-backward
(Pretty confusing names I have to say)

Jaap

On Sat, 2003-12-13 at 18:52, Behdad Esfahbod wrote:
> You can always enable backward-searching using ctrl-R.  BTW, it
> happens a lot that in the middle of writing a command, you go
> back and force and look up something in previous commands you
> have types.  So the current behaviour is not useful.  And it has
> been like this for such a long time that cannot be changed.
> 
> behdad
> 
> On Sat, 13 Dec 2003, Jaap A. Haitsma wrote:
> 
> > Hi,
> >
> > Standard the up arrow and the down arrow are bound to "previous-history"
> > and "next-history" respectively.
> >
> > I changed these to "history-search-backward" and
> > "history-search-forward" respectively by adding the following to lines
> > to /etc/inputrc
> >
> > "\M-[A":history-search-backward
> > "\M-[B":history-search-forward
> >
> > If you have not typed anything on the prompt and use the arrow keys the
> > behaviour is identical to the behaviour of "previous-history" and
> > "next-history".
> >
> > However if you type something (a beginning of a command) and then use
> > the arrow keys it will search backward or forward in the history trying
> > to find a command of which the first charaters match to the ones your
> > type. This is a very powerful feature.
> >
> > To demonstrate it here's an example
> > For example I use cvs over the internet quite a bit. To login I have to
> > type something like "cvs -d :pserver:jaap at haitsma.org/cvs login" Now on
> > the next day I want to login again with the proposed feature enabled I
> > only type cvs -d and then the up arrow.
> >
> > Really cool thing of this is that the normal behaviour of the arrow keys
> > does not change while you get a very powerful feature
> >
> > Jaap
> >
> >
> > --
> > fedora-devel-list mailing list
> > fedora-devel-list at redhat.com
> > http://www.redhat.com/mailman/listinfo/fedora-devel-list
> >
> >
> 
> 
> --
> fedora-devel-list mailing list
> fedora-devel-list at redhat.com
> http://www.redhat.com/mailman/listinfo/fedora-devel-list





More information about the fedora-devel-list mailing list