Added the description of the control-character bug.
[selector.git] / selector.1
index 903c428..5cae06f 100644 (file)
@@ -56,6 +56,8 @@ remove duplicated lines
 start with the regexp mode activated
 .IP "\fB-a\fP" 10
 make the matching case sensitive
+.IP "\fB-q\fP" 10
+make a flash instead of a beep when there is an edition error
 .IP "\fB--\fP" 10
 state that all following arguments are filenames
 .IP "\fB-t <title>\fP" 10
@@ -79,10 +81,33 @@ 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 -d -i -b -v <(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
-long.
+There are modeline display problems if the pattern is too long. If a
+line contains control characters, the returned line has been converted
+to printable characters.
 
 .SH "AUTHOR"
 .PP