Added the ^U key to erase the pattern.
[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 ';' 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 Keys corresponding to ASCII codes between ' ' and '~' add a character
23 to the pattern string. The Delete key, Backspace key, ^D and ^H delete
24 one character from the pattern string.
25
26 The Up and Down cursor keys move the selected line accordingly, and
27 PageUp and PageDown move by ten lines. The Home and End key move to
28 the top and the bottom of the list respectively. The return key
29 selects the current line and exits.
30
31 The ^U key erases the current pattern, and you can cancel the
32 selection by either interrupting the command with ^C or by typing ^G.
33
34 .SH "OPTIONS"
35 .IP "\fB-h\fP" 10
36 display help and exits
37 .IP "\fB-v\fP" 10
38 inject the selected line into the tty input buffer
39 .IP "\fB-m\fP" 10
40 force the monochrome mode
41 .IP "\fB-i\fP" 10
42 inverse the order of the lines
43 .IP "\fB-b\fP" 10
44 remove the numeric prefix from bash history
45 .IP "\fB-z\fP" 10
46 remove the time prefix from zsh history
47 .IP "\fB-d\fP" 10
48 remove duplicated lines
49 .IP "\fB-e\fP" 10
50 start with the regexp mode activated
51 .IP "\fB-c <fg modeline> <bg modeline> <fg highlight> <bg highlight>\fP" 10
52 select the modline and highlight color numbers
53 .IP "\fB-o <output filename>\fP" 10
54 write the selected line into the specified file
55 .IP "\fB-s <pattern separator>\fP" 10
56 specify the symbol to separate the substrings in the search pattern
57 .IP "\fB-l <max number of lines>\fP" 10
58 specify the maximum number of lines to consider
59 .IP "\fB-f <input filename>\fP" 10
60 specify the file to search into
61
62 .SH "EXAMPLES"
63
64 To use selector to search into your bash history, you can use
65
66 .B selector -d -i -b -v -f <(history)
67
68 .SH "BUGS"
69
70 Probably many.
71
72 .SH "AUTHOR"
73 .PP
74 Written by Francois Fleuret <francois@fleuret.org>. Permission is
75 granted to copy, distribute and/or modify this document under the
76 terms of the GNU GPL.