Annotation of mandoc/apropos.1, Revision 1.2
1.2 ! kristaps 1: .\" $Id: apropos.1,v 1.1 2011/10/06 23:00:54 kristaps Exp $
1.1 kristaps 2: .\"
3: .\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4: .\"
5: .\" Permission to use, copy, modify, and distribute this software for any
6: .\" purpose with or without fee is hereby granted, provided that the above
7: .\" copyright notice and this permission notice appear in all copies.
8: .\"
9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16: .\"
1.2 ! kristaps 17: .Dd $Mdocdate: October 6 2011 $
1.1 kristaps 18: .Dt APROPOS 1
19: .Os
20: .Sh NAME
21: .Nm apropos
22: .Nd search the manual page database
23: .Sh SYNOPSIS
24: .Nm
25: .Op Fl eIr
26: .Op Fl a Ar arch
27: .Op Fl c Ar cat
28: .Op Fl s Ar sort
29: .Op Fl t Ar types
30: .Ar key
31: .Sh DESCRIPTION
32: The
33: .Nm
34: utility queries the manual page database.
35: Its arguments are as follows:
36: .Bl -tag -width Ds
37: .It Fl a Ar arch
38: Search only for a particular architecture.
39: .It Fl c Ar cat
40: Search only for a category (manual section).
41: See
42: .Xr man 1
43: for a listing of categories.
44: .It Fl e
45: Search only for exact matches (subject to
46: .Fl I ) .
47: .It Fl I
48: Case-insensitive matching.
49: .It Fl r
50: Consider
51: .Ar key
52: to be a POSIX regular expression (subject to
53: .Fl I ) .
54: See
55: .Xr re_format 7
56: for a description of regular expressions.
57: .It Fl s Ar sort
58: Sorting type.
59: Accepts
60: .Ar cat
61: to sort by category and then by title or
62: .Ar title
63: to sort by title (which is the default).
64: .It Fl t Ar types
65: Consider only types of keyword match, where
66: .Ar types
67: is a comma-separated list consisting of the following:
68: .Ar name ,
69: manual names;
70: .Ar func ,
71: function names;
72: .Ar utility ,
73: utility names;
74: .Ar incl ,
75: include files;
76: .Ar var ,
77: variable names;
78: .Ar stand ,
79: standards ;
80: .Ar auth ,
81: authors;
82: .Ar conf ,
83: configuration strings;
84: .Ar desc ,
85: descriptive text;
86: .Ar xref ,
87: cross-references.
88: .Ar path ,
89: file pathnames;
90: .Ar env ,
91: environment variables; or
92: .Ar err ,
93: error codes.
94: Specifying
95: .Ar all
96: will search for all types.
97: .It Ar key
98: The search key.
99: .El
100: .Pp
101: By default,
102: .Nm
103: searches for substring matches of
104: .Ar key
105: in manual names and descriptions
106: and displays results by manual title.
107: Output is formatted as
108: .Pp
109: .D1 title(cat) \- description
110: .Pp
111: Where
112: .Qq title
113: is the manual's title (note multiple manual names may exist for one
114: title),
115: .Qq cat
116: is the category, and
117: .Qq description
118: is the manual's short description.
119: If an architecture is specified for the manual, it is displayed as
120: .Pp
121: .D1 title(cat/arch) \- description
122: .Pp
123: Resulting manuals may be accessed as
124: .Pp
125: .Dl $ man -s cat title
126: .Pp
127: If an architecture is specified in the output, use
128: .Pp
129: .Dl $ man -s cat -S arch title
130: .\" .Sh IMPLEMENTATION NOTES
131: .\" Not used in OpenBSD.
132: .\" .Sh RETURN VALUES
133: .\" For sections 2, 3, & 9 only.
134: .\" .Sh ENVIRONMENT
135: .\" For sections 1, 6, 7, & 8 only.
136: .\" .Sh FILES
137: .Sh EXIT STATUS
138: .Ex -std
139: .Sh EXAMPLES
140: Search for
141: .Qq optind
142: as a variable name in the library category:
143: .Pp
144: .Dl $ apropos -tvar -c 3 optind
145: .Pp
146: Search for all manuals referencing the term
147: .Qq POSIX
148: in any letter case:
149: .Pp
150: .Dl $ apropos -tall -I posix
151: .\" .Sh DIAGNOSTICS
152: .\" For sections 1, 4, 6, 7, & 8 only.
153: .\" .Sh ERRORS
154: .\" For sections 2, 3, & 9 only.
155: .Sh SEE ALSO
156: .Xr man 1 ,
157: .Xr mandoc 1 ,
158: .Xr re_format 7
159: .\" .Sh STANDARDS
160: .\" .Sh HISTORY
161: .Sh AUTHORS
162: The
163: .Nm
164: utility was written by
1.2 ! kristaps 165: .An Kristaps Dzonsons ,
! 166: .Mt kristaps@bsd.lv .
1.1 kristaps 167: .\" .Sh CAVEATS
168: .\" .Sh BUGS
169: .\" .Sh SECURITY CONSIDERATIONS
170: .\" Not used in OpenBSD.
CVSweb