CLI Magic: Using command history in the bash shell (Linux.com)
Posted Jul 4, 2006 9:28 UTC (Tue) by
gip (subscriber, #20897)
In reply to:
CLI Magic: Using command history in the bash shell (Linux.com) by sveinrn
Parent article:
CLI Magic: Using command history in the bash shell (Linux.com)
Quote:
I want to be able to type "mount<up><up><up>" and get back the command I want.
Yes, I had this when I used 4DOS and liked it so I set up bash to do the same thing (it's a "readline" capability, I think).
Create a .inputrc file in your root and put in
"\e[5~": history-search-backward
"\e[6~": history-search-forward
Or whatever your PgUp and PgDn keys output. Next login it should work.
other stuff I use in .inputrc
"\e[2~": kill-whole-line
"\e[3;2~": kill-line
So Ins clears the line and SHIFT-Del clears from the cursor to the end
Hope this helps.
Ciao
G
(
Log in to post comments)