From: Francois Fleuret Date: Thu, 7 May 2009 08:41:25 +0000 (+0200) Subject: Added a section about interaction with readline. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=a6c319c9adcbde67f7eb7208ccbec70ea8210f8b;p=selector.git Added a section about interaction with readline. --- 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