From LedHed's Wiki
Revision as of 17:26, 5 October 2012 by Ledhed (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

One of my favorite features of FreeBSD/CShell is that you can start typing a command and use the up/down arrows to cycle through previous commands which contain the characters you've already typed. Well as it turns out you can do the same thing with Bash.


Edit ~/.inputrc and add the following lines:

"\e[A": history-search-backward
"\e[B": history-search-forward

Or leave the the arrow keys alone and bind them to the PgUp/PgDn keys.

"\e[5~": history-search-backward
"\e[6~": history-search-forward


References

http://stackoverflow.com/questions/1030182/how-do-i-change-bash-history-completion-to-complete-whats-already-on-the-line