Can now be somewhat useful.
[iomenu.git] / iomenu.1
blob69aea8d886a25d3be107fa514612219f8c4c6c7d
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
9 .Sh DESCRIPTION
11 The
12 .Nm
13 utility filters lines form stdin interactively with the keyboard, and print
14 the selected line to stdout.
15 .Pp
16 Lower case switches are for the interface, uppercase switches are for
17 input/output.
18 .Bl -tag
19 .It Fl p Cm prompt
20 Aditionnal part of the prompt to add before the '> '.
22 .It Fl m Cm mode
24 .It Fl n
25 Display line number before the match.
27 .It Fl N
28 Only return the line number.
30 .It Fl r
31 Output the current candidate repeteadly every time it changes: at each
32 movement.
34 .It Fl k Cm validate key
35 Aditionnal key to use to return current selection.  This can a space for
36 use as a word completion engine (^N in vim).
38 .It Fl s Cm separator
39 Separator for the output:  The selected candidate will be printed up to
40 this separator, rather than being printed completely.  The separator will
41 be aligned according to 2 rules:
42 .Bl -enum
43 .It
44 The biggest part before separator;
46 .It
47 Do not outreach the half of the screen horizontally.
48 .El
49 .Pp
50 The right part will also be grayed, and not printed in the prompt.
52 .It Fl c Cm comment
53 Comment char: Every line starting with this character will be treated as a
54 header.  Header are always visible and bold (\033[1m), even when not
55 matched.  This is convenient to prompt the user items from multiple
56 categories at the same time.
58 .It Fl l Cm lines
59 Number of lines to display at once.  Default is 30.
61 .It Fl b
62 Display (and update) the prompt to be at the bottom of the candidates, and
63 at the bottom of the screen.
65 .It Fl t
66 Display (and update) the prompt to be at the top of the candidates, and at the bottom of the screen.
68 .It Fl d Cm default
69 Set the input a DEFAULT string before to start.
71 .It Fl h Cm header
72 Set the character to use to mark header and delimit sections.
73 .El
75 .Sh KEYBINDINGS
77 .Bl -tag
79 .It ^I
80 .It Tab
81 Switch between candidates, and finally come back to the
82 original input without completion.
84 .It ^H
85 .It Backspace
86 Delete one char backward, but if there is no char
87 backward, it should return an error code of 1.
89 .It ^C
90 Cancel, and make filter return the error code of 1.
92 .It ^V key
93 Insert the next KEY pressed literally.
95 .It ^W
96 Deletes the last entered word.
98 .It ^U
99 Deletes the entire input.