Changed the color option description to make clear it takes numbers as
[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] -f <filename>
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 ';', the display is updated in real
11 time to show only the lines containing all the said strings.
12
13 The main usage of selector is as an efficient search in the shell
14 command history. With the correct option, it will inject the selected
15 line into the virtual tty input buffer, hence allowing the user to
16 edit the line and execute it as a standard command.
17
18 Keys corresponding to ASCII codes between ' ' and '~' add a character
19 to the pattern string. The Delete key, Backspace key, ^D and ^H delete
20 one character from the pattern string.
21
22 The Up and Down cursor keys move the selected line accordingly, and
23 PageUp and PageDown move by ten lines. The Home and End key move to
24 the top and the bottom of the list respectively. The return key
25 selects the current line and exits.
26
27 You can cancel the selection either by interrupting the command with
28 ^C or by typing ^G.
29
30 .SH "OPTIONS"
31 .IP "\fB-h\fP" 10
32 display help and exits
33 .IP "\fB-v\fP" 10
34 inject the selected line into the tty input buffer
35 .IP "\fB-m\fP" 10
36 force the monochrome mode
37 .IP "\fB-i\fP" 10
38 inverse the order of the lines
39 .IP "\fB-b\fP" 10
40 remove the numeric prefix from bash history
41 .IP "\fB-z\fP" 10
42 remove the time prefix from zsh history
43 .IP "\fB-r\fP" 10
44 remove duplicated lines
45 .IP "\fB-c <fg modeline> <bg modeline> <fg highlight> <bg highlight>\fP" 10
46 select the modline and highlight color numbers
47 .IP "\fB-o <output filename>\fP" 10
48 write the selected line into the specified file
49 .IP "\fB-s <pattern separator>\fP" 10
50 specify the symbol to separate the substrings in the search pattern
51 .IP "\fB-l <max number of lines>\fP" 10
52 specify the maximum number of lines to consider
53 .IP "\fB-f <input filename>\fP" 10
54 specify the file to search into
55
56 .SH "EXAMPLES"
57
58 To use selector to search into your bash history, you can use
59
60 .B selector -r -i -b -v -f <(history)
61
62 .SH "BUGS"
63
64 Probably many.
65
66 .SH "AUTHOR"
67 .PP
68 Written by Francois Fleuret <francois@fleuret.org>. Permission is
69 granted to copy, distribute and/or modify this document under the
70 terms of the GNU GPL.