[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Change setting of arrow keys for history in BASH (Fedora Core 2 Wishlist)
- From: "Jaap A. Haitsma" <jaap haitsma org>
- To: fedora-devel-list redhat com
- Subject: Change setting of arrow keys for history in BASH (Fedora Core 2 Wishlist)
- Date: Sat, 13 Dec 2003 13:48:32 +0100
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 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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]