Added a short explanation for the new bash-selector.sh.
authorFrancois Fleuret <francois@fleuret.org>
Mon, 24 Oct 2011 20:51:23 +0000 (22:51 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Mon, 24 Oct 2011 20:51:23 +0000 (22:51 +0200)
selector.1

index bc83e45..0446d14 100644 (file)
@@ -1,4 +1,4 @@
-.TH "SELECTOR" "1.1.4" "June 2011" "Francois Fleuret" "User Commands"
+.TH "SELECTOR" "1.1.4" "October 2011" "Francois Fleuret" "User Commands"
 
 \" This man page was written by Francois Fleuret <francois@fleuret.org>
 \" and is distributed under a Creative Commons Attribution-Share Alike
@@ -131,6 +131,18 @@ selection from the line to return
 \fB-l \fI<number>\fR, \fB--number-of-lines \fI<number>\fR
 specify the maximum number of lines to take into account
 
+.SH "USAGE WITH BASH"
+
+The selector command comes with a shell script for bash. If you add
+
+.B . bash-selector.sh
+
+in your
+.IR ~/.bashrc
+(do not forget the dot before the command name), it will remap M-r to
+the smart history search, and redefine cd to have M-c provide a smart
+cd history.
+
 .SH "EXAMPLES"
 
 To use selector to search into your bash history
@@ -148,26 +160,6 @@ file contains ^A)
 
 .B selector -v -x ^A <(awk < something.txt \(aq{ print $0\(dq^A\(dqNR }\(aq)
 
-.SH "KEYBINDING IN BASH"
-
-You can associate selector to a single key in bash by using the
-command 'bind' in your bash initialization file. For instance, to
-associate it to M-r (that is, the "Alt" and "r" key pressed together),
-just add something like
-
-bind \(aq\(dq\\C-[r\(dq:\(dq\\C-a\\C-kselector --bash <(history)\\C-m\(dq\(aq
-
-in your
-.IR ~/.bashrc .
-
-This binding uses the control character ^A to put the cursor to the
-mostleft location and ^K to erase the current content of the readline
-buffer, and it simulates the enter key with ^M.
-
-Note that depending on the configuration of your system, the sequence
-associated to the M-r key, which is here "C-[r", may differ. To figure
-it out, simply press C-q followed by M-r in the console.
-
 .SH "BUGS"
 
 There are modeline display problems if the pattern is too long. This