Simplified, hopefully cleaner
[iomenu.git] / iomenu.1
blobf7ef59ba42f6670c6392e0792de3dbf924b4b90f
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 c
23 Set the interaction to complete mode.  The default is filter mode.
25 .It Fl n
26 Display line number before the match.
28 .It Fl N
29 Only return the line number.
31 .It Fl r
32 Output the current candidate repeteadly every time it changes: at each
33 movement.
35 .It Fl k Cm validate key
36 Aditionnal key to use to return current selection.  This can a space for
37 use as a word completion engine (^N in vim).
39 .It Fl s Cm separator
40 Separator for the output:  The selected candidate will be printed up to
41 this separator, rather than being printed completely.  The separator will
42 be aligned according to 2 rules:
43 .Bl -enum
44 .It
45 The biggest part before separator;
47 .It
48 Do not outreach the half of the screen horizontally.
49 .El
50 .Pp
51 The right part will also be grayed, and not printed in the prompt.
53 .It Fl h Cm char
54 Header char: Every line starting with this character will be treated as a
55 header.  Header are always visible and bold (\\033[1m), even when not
56 matched.  This is convenient to prompt the user items from multiple
57 categories at the same time.
59 .It Fl l Cm lines
60 Number of lines to display at once.  Default is 30.
62 .It Fl d Cm string
63 Set the input a DEFAULT string before to start.
64 .El
66 .Sh KEYBINDINGS
68 .Bl -tag
70 .It ^I
71 .It Tab
72 Switch between candidates, and finally come back to the
73 original input without completion.
75 .It ^H
76 .It Backspace
77 Delete one char backward, but if there is no char
78 backward, it should return an error code of 1.
80 .It ^C
81 Cancel, and make filter return the error code of 1.
83 .It ^V key
84 Insert the next KEY pressed literally.
86 .It ^W
87 Deletes the last entered word.
89 .It ^U
90 Deletes the entire input.
91 .El