Thursday, November 12, 2009

Smart search history command in linux bash

Well, many people knows the up key can search the similar command in matlab terminal. But in linux (Ubuntu), if you work on terminal and want to try this, then nothing happen. If you want it search command history automaticly, you need do:

edit \etc\inputrc
uncomment next part:

# alternate mappings for "page up" and "page down" to search the history
"\e[5~": history-search-backward
"\e[6~": history-search-forward

Now you can use page up and down to search command history. Is that cool? eh.....

1 comment:

mahasiswa teladan said...

hi..Im college student, thanks for sharing :)