Simplified a little some functions
[iomenu.git] / iomenu.1
blob212207cef91e6eae904b736efad1bee4d1017d23
1 .Dd $Mdocdate: October 16 2016 $
2 .Dt IOMENU 1
3 .Os
4 .Sh NAME
5 .Nm iomenu
6 .Op Fl pnNrksclbtdhm
7 .Op Ar file
10 .Sh DESCRIPTION
12 The
13 .Nm
14 utility filters lines form stdin interactively with the keyboard, and print
15 the selected line to stdout.
16 .Pp
17 Lower case switches are for the interface, uppercase switches are for
18 input/output.
19 .Bl -tag
20 .It Fl n
21 Display line numbers in interface.
23 .It Fl N
24 Return the line number rather than the match.
26 .It Fl k Cm char
27 Key to use to validate current selection in addition to Enter.
29 .It Fl s Cm separator
30 Character separating the content from the comments.  Every character after
31 the separator will be considered as comment and will be grayed and aligned
32 in the interface.
33 .Pp
34 If a separator is at the beginning of a line (without leading space), the
35 line is considered as a section header, and it will always be displayed
36 regardless if it matches or not.
38 .It Fl l Cm lines
39 Number of lines to display at once.  Default is 30.
40 .El
43 .Sh KEYBINDINGS
45 .Bl -tag
46 .It Cm ^M, ^J, Enter
47 Print the matched line to stdout and exit.
49 .It Cm ^@, ^Space
50 Print the content of the input rather than the matched line to stdout and exit.
52 .It Cm ^P / ^N, Up / Down
53 Navigate to the previous / next line.
55 .It Cm PageUp / PageDown
56 Navigate 10 lines up / down.
58 .It Cm ^I, Tab
59 Set input to the currently highlighted candidate, then cycle through candidate
60 list.
62 .It Cm ^H, Backspace
63 Delete one char backward, but if there is no char
64 backward, it should return an error code of 1.
66 .It Cm ^C
67 Cancel, and make filter return the error code of 1.
69 .It ^W
70 Deletes the last entered word.
72 .It ^U
73 Deletes the entire input and jump to the first line.
74 .El