X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=selector.git;a=blobdiff_plain;f=selector.1;h=0446d14780497b102fa18fe0ea6e39456fa801ad;hp=a5b5f24ea9c82c50fe54fa7c689fac72df488742;hb=a2e9ecbe63af0f7b4b84b1b2a81562714746bcdc;hpb=738fb5bb77517dc990d08a85520bd5998288a2dd diff --git a/selector.1 b/selector.1 index a5b5f24..0446d14 100644 --- a/selector.1 +++ b/selector.1 @@ -1,4 +1,4 @@ -.TH "SELECTOR" "1.1.2" "April 2010" "Francois Fleuret" "User Commands" +.TH "SELECTOR" "1.1.4" "October 2011" "Francois Fleuret" "User Commands" \" This man page was written by Francois Fleuret \" and is distributed under a Creative Commons Attribution-Share Alike @@ -84,8 +84,12 @@ start in regexp mode \fB-a\fR, \fB--case-sensitive\fR start in case sensitive mode .TP +\fB-u\fR, \fB--upper-case-makes-case-sensitive\fR +using an upper case in the matching string makes the matching +case-sensitive +.TP \fB-n\fR, \fB--exclamation-negates\fR -substrings starting with an exclamation point must be absent for a line +substrings starting with an exclamation mark must be absent for a line to match .TP \fB-q\fR, \fB--no-beep\fR @@ -127,6 +131,18 @@ selection from the line to return \fB-l \fI\fR, \fB--number-of-lines \fI\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 @@ -144,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