]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
inputrc: Ctrl-P/Ctrl-N only display matching lines.
authorSimon Ruderich <simon@ruderich.org>
Sat, 14 Jan 2012 13:28:47 +0000 (14:28 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sat, 14 Jan 2012 13:28:47 +0000 (14:28 +0100)
inputrc

diff --git a/inputrc b/inputrc
index 20832dad169fe24f28b4640b3fe3775d987b1069..981c6213ac6ae4a27a7e7a4e25479681217084ee 100644 (file)
--- a/inputrc
+++ b/inputrc
@@ -23,5 +23,8 @@ set editing-mode vi
 "jj": vi-movement-mode
 "jk": vi-movement-mode
 
-"\C-p": previous-history
-"\C-n": next-history
+# <Up>/<Down> with the additional effect that only lines starting with the
+# current input are matched. Very useful to recall old commands quickly - just
+# type the first few characters.
+"\C-p": history-search-backward
+"\C-n": history-search-forward