Cosmetics.
[selector.git] / selector.1
1 .TH "SELECTOR" "1"
2 .SH "NAME"
3 selector - A simple command line for dynamic pattern selection
4 .SH "SYNOPSIS"
5 .PP
6 \fBselector\fP [\fBoptions\fP] [<filename1> [<filename2> ...]]
7 .SH "DESCRIPTION"
8 .PP
9 \fBselector\fP is a command line dynamic string selection. As you type
10 a list of strings separated by ';' or a regexp, the display is updated
11 in real time to show only the lines containing all the said strings,
12 or matching the regexp.
13
14 The ^R key switches between the standard multi-substring mode and the
15 regexp mode.
16
17 The main usage of selector is as an efficient search in the shell
18 command history. With the correct option, it will inject the selected
19 line into the virtual tty input buffer, hence allowing the user to
20 edit the line and execute it as a standard command.
21
22 Selector is also a good tool to test regexp quickly.
23
24 Keys corresponding to ASCII codes between ' ' and '~' add a character
25 to the pattern string. The Backspace key, ^H and ^? delete the
26 character on the left of the cursor, while Delete key and ^D delete
27 the character at cursor location.
28
29 The Up and Down cursor keys move the selected line accordingly, and
30 PageUp and PageDown move by ten lines. The Home and End key move to
31 the top and the bottom of the list respectively. The return key
32 selects the current line and exits.
33
34 The shortcuts ^A, ^E, ^U, and ^K do somehow what they do in readline,
35 and you can cancel the selection by either interrupting the command
36 with ^C or by typing ^G.
37
38 .SH "OPTIONS"
39 .IP "\fB-h\fP" 10
40 display help and exits
41 .IP "\fB-m\fP" 10
42 force the monochrome mode
43 .IP "\fB-i\fP" 10
44 inverse the order of the lines
45 .IP "\fB-b\fP" 10
46 remove the numeric prefix from bash history
47 .IP "\fB-z\fP" 10
48 remove the time prefix from zsh history
49 .IP "\fB-d\fP" 10
50 remove duplicated lines
51 .IP "\fB-e\fP" 10
52 start with the regexp mode activated
53 .IP "\fB-a\fP" 10
54 make the matching case sensitive
55 .IP "\fB--\fP" 10
56 state that all following arguments are filenames
57 .IP "\fB-t <title>\fP" 10
58 add a title in the modeline
59 .IP "\fB-c <fg modeline> <bg modeline> <fg highlight> <bg highlight>\fP" 10
60 select the modeline and highlight color numbers
61 .IP "\fB-v\fP" 10
62 inject the selected line into the tty input buffer
63 .IP "\fB-o <output filename>\fP" 10
64 write the selected line into the specified file
65 .IP "\fB-s <pattern separator>\fP" 10
66 specify the symbol to separate the substrings in the search pattern
67 .IP "\fB-l <max number of lines>\fP" 10
68 specify the maximum number of lines to take into account
69 .IP "\fB-f <input filename>\fP" 10
70 specify the file to search into
71
72 .SH "EXAMPLES"
73
74 To use selector to search into your bash history, you can use
75
76 .B selector -d -i -b -v <(history)
77
78 .SH "BUGS"
79
80 Modeline display problems if the pattern is too long. Probably many
81 others.
82
83 .SH "AUTHOR"
84 .PP
85 Written by Francois Fleuret <francois@fleuret.org>. Permission is
86 granted to copy, distribute and/or modify this document under the
87 terms of the GNU GPL.