You're viewing a comment by staxos and its responses.

staxos Permalink
June 17, 2008, 04:12

I'm surprised no one mentioned this before. This also answers Ix's question (or comes close to it). Put the following in your ~/.inputrc file and save it (not including the dashes):
---------
"\eOA": history-search-backward
"\eOB": history-search-forward
"\eOC": forward-char
"\eOD": backward-char
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char
---------
Now, on the shell, start typing the beginning of a command, and press the Up key. You'll see the history is navigated only within the commands that start with the string you type (I call this the matlab type of history navigation). Very useful if you're used to the Up and Down keys.

Comment Responses

HarishVangala Permalink
October 26, 2012, 12:31

Thanks a lot staxos!! Thats Wonderful & simple!!

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "antispam": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.