X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=inline;f=selector.1;h=18c0018f957a90fb3a31fe08b4a72729929bf9b9;hb=e9e4b36f043110f64000c864485943f1b53d8562;hp=4f99576bb93b187c1ae18c65be79c46aa3c82956;hpb=f5e16cae37acb858ac61fcf407c52bc8ccf15a83;p=selector.git diff --git a/selector.1 b/selector.1 index 4f99576..18c0018 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 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 sequence +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 here to first erase the +current line content and to simulate the enter key. + .SH "BUGS" There are modeline display problems if the pattern is too