From a6c319c9adcbde67f7eb7208ccbec70ea8210f8b Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Thu, 7 May 2009 10:41:25 +0200 Subject: [PATCH] Added a section about interaction with readline. --- selector.1 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/selector.1 b/selector.1 index 4f99576..4e1d26d 100644 --- a/selector.1 +++ b/selector.1 @@ -81,6 +81,28 @@ To use selector to search into your bash history, you can use .B selector -d -i -b -v <(history) +.SH "INTERACTION WITH READLINE" + +For better efficiency, you can associate selector to a one key in the +shell through the use of the readline configuration file. To do so, +you have first to pick a key and check the character sequences +associated to it. + +You can do that by typing at the console prompt Control-q followed by +the key you want to use. For instance, if you want to use Alt-r, you +may get ^[r. Then, you have to add in the readline configuration file +~/.inputrc the following: + +"^[r": "^A^K selector -q -b -i -d -v -l 10000 <(history)^M" + +Note that you have to put the actual control characters in the +configuration file, not a '^' followed by a character. To do so with +Emacs for instance, you have to use the C-q key followed by another +key: C-q C-a inserts "^A", C-q C-[ inserts "^[", etc. + +The control characters in this line are there to erase the current +line before invoking the selector. + .SH "BUGS" There are modeline display problems if the pattern is too -- 2.20.1