Automatic commit
[selector.git] / selector.1
1 .TH "SELECTOR" "1"
2 .SH "NAME"
3 selector - A simple shell command 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 simple shell command which provides a dynamic
10 string selection. A you type a list of substring separated by ';', the
11 display is updated to show only the lines containing all the said
12 substrings.
13
14 The main usage of selector is as an efficient search in the shell
15 command history. With the correct option, it will inject the selected
16 line into the virtual tty input buffer, hence allowing the user to
17 edit the line and execute it as a standard command.
18
19 Keys corresponding to ASCII codes between ' ' and '~' add a character
20 to the pattern string. The Delete key, Backspace key, ^D and ^H delete
21 one character from the pattern string.
22
23 The up and down cursor keys move the selected line accordingly, and
24 the PageUp and PageDown move by ten lines. The Home and End key moves
25 to the top and the bottom of the list respectively. The return key
26 select the current line and quit.
27
28 You can cancel the selection either by interrupting the command with
29 ^C or by typing ^G.
30
31 .SH "OPTIONS"
32 .IP "\fB-h\fP" 10
33 display help and exits
34 .IP "\fB-v\fP" 10
35 inject the selected line into the tty input buffer
36 .IP "\fB-m\fP" 10
37 force the monochrome mode
38 .IP "\fB-t <color theme number>\fP" 10
39 select a color them
40 .IP "\fB-o <output filename>\fP" 10
41 write the selected line into the specified file
42 .IP "\fB-s <pattern separator>\fP" 10
43 specify the symbol to separate the substrings in the search pattern
44 .IP "\fB-l <max number of lines>\fP" 10
45 specify the maximum number of lines to consider
46 .IP "\fB-f <input filename>\fP" 10
47 specify the file to search into
48
49 .SH "EXAMPLES"
50
51 To use selector to search into your shell history:
52
53 selector -f ${HISTFILE} -v
54
55 .SH "AUTHOR"
56 .PP
57 Written by Francois Fleuret <francois@fleuret.org>. Permission is
58 granted to copy, distribute and/or modify this document under the
59 terms of the GNU GPL.