X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=selector.1;h=66635583683683f51e45250eb676c4d516e240aa;hb=70e0b59610745e00fe015f96a5b6155f97110b30;hp=042c1fb7260b4178ade09337ddcfab80faade9b7;hpb=b5af9318678089e98020f531b7af62cd7559d3d6;p=selector.git diff --git a/selector.1 b/selector.1 index 042c1fb..6663558 100644 --- a/selector.1 +++ b/selector.1 @@ -1,9 +1,9 @@ +.TH "SELECTOR" 1 "July 2009" "Francois Fleuret" "User Commands" + \" This man page was written by Francois Fleuret \" and is distributed under a Creative Commons Attribution-Share Alike \" 3.0 License. -.TH "SELECTOR" 1 "July 2009" "Francois Fleuret" "User Commands" - .SH "NAME" selector \- A simple command line utility for dynamic pattern selection @@ -14,17 +14,17 @@ selector \- A simple command line utility for dynamic pattern selection .SH "DESCRIPTION" -\fBselector\fP is a command line utility for dynamic string -selection. It reads the content of the specified files, and as the -user types a list of strings separated by ";" (or a regexp), the +\fBselector\fP is a command line utility for interactive real-time +pattern matching. It reads the content of the specified files, and as +the user types a list of strings separated by ";" (or a regexp), the display is updated in real time to show only the lines containing all the said strings (or matching the regexp). -This command was mainly designed as a way to search in the shell -history, for which it is substantially more efficient than the -standard readline ^R binding. With the -v option, it injects the -selected line into the tty input buffer, hence allowing the user to -edit the line and execute it as a standard command. +This command was mainly designed as a way to search efficiently in the +shell history, for which it is substantially better than the standard +readline ^R binding. With the -v option, it injects the selected line +into the tty input buffer, hence allowing the user to edit the line +and execute it as a standard command. Selector is also a handy tool to test regexps, or to display menus with many possible choices. For the latter, the -x option allows to @@ -118,7 +118,7 @@ specify the maximum number of lines to take into account \fB-f \fI\fR specify a file to search into (option kept for compatibility reasons) -.SH "EXAMPLE" +.SH "EXAMPLES" To use selector to search into your bash history @@ -127,7 +127,7 @@ To use selector to search into your bash history To show a list of directories and insert a cd command to the selected one (using @ as a separator) -.B selector -v -x @ <(find . -type d | awk \(aq{print $1\(dq@cd \(dq$0}\(aq) +.B selector -v -x @ <(find . -type d | awk \(aq{print $0\(dq@cd \(dq$0}\(aq) To select a line in a long text and returns the line number (this command uses ^A as a separator, hence there will be problems if the @@ -147,14 +147,14 @@ bind \(aq\(dq\\C-[r\(dq:\(dq\\C-a\\C-kselector -q -b -i -d -v -w -l ${HISTSIZE} in your .IR ~/.bashrc . +This bindings 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. -The control character "C-a" puts the cursor to the mostleft location, -"C-k" erases the current content of the readline buffer, and "C-m" -simulates the enter key. - .SH "BUGS" There are modeline display problems if the pattern is too long. This @@ -162,8 +162,8 @@ program does not handle multibyte characters. .SH "AUTHOR" -The selector command was written by Francois Fleuret - and is distributed under the terms of the GNU -General Public License version 3 as published by the Free Software -Foundation. This is free software: you are free to change and -redistribute it. There is NO WARRANTY, to the extent permitted by law. +Written by Francois Fleuret and distributed +under the terms of the GNU General Public License version 3 as +published by the Free Software Foundation. This is free software: you +are free to change and redistribute it. There is NO WARRANTY, to the +extent permitted by law.