version 1.44, 2017/03/27 14:40:39 |
version 1.49, 2018/11/22 12:33:52 |
|
|
.\" $Id$ |
.\" $Id$ |
.\" |
.\" |
.\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> |
.\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> |
.\" Copyright (c) 2011, 2012, 2014, 2017 Ingo Schwarze <schwarze@openbsd.org> |
.\" Copyright (c) 2011,2012,2014,2017,2018 Ingo Schwarze <schwarze@openbsd.org> |
.\" |
.\" |
.\" Permission to use, copy, modify, and distribute this software for any |
.\" Permission to use, copy, modify, and distribute this software for any |
.\" purpose with or without fee is hereby granted, provided that the above |
.\" purpose with or without fee is hereby granted, provided that the above |
|
|
.Nd search manual page databases |
.Nd search manual page databases |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm |
.Nm |
.Op Fl acfhklw |
.Op Fl afk |
.Op Fl C Ar file |
.Op Fl C Ar file |
.Op Fl M Ar path |
.Op Fl M Ar path |
.Op Fl m Ar path |
.Op Fl m Ar path |
|
|
.Xr makewhatis 8 |
.Xr makewhatis 8 |
databases in the default paths stipulated by |
databases in the default paths stipulated by |
.Xr man 1 |
.Xr man 1 |
and uses case-insensitive substring matching |
and uses case-insensitive extended regular expression matching |
.Pq the Cm = No operator |
|
over manual names and descriptions |
over manual names and descriptions |
.Pq the Li \&Nm No and Li \&Nd No macro keys . |
.Pq the Li \&Nm No and Li \&Nd No macro keys . |
Multiple terms imply pairwise |
Multiple terms imply pairwise |
|
|
Search for all words in |
Search for all words in |
.Ar expression |
.Ar expression |
in manual page names only. |
in manual page names only. |
The search is case insensitive and matches whole words only. |
The search is case-insensitive and matches whole words only. |
In this mode, macro keys, comparison operators, and logical operators |
In this mode, macro keys, comparison operators, and logical operators |
are not available. |
are not available. |
.It Fl k |
.It Fl k |
Line 123 Restrict the search to pages for the specified |
|
Line 122 Restrict the search to pages for the specified |
|
.Xr machine 1 |
.Xr machine 1 |
architecture. |
architecture. |
.Ar arch |
.Ar arch |
is case insensitive. |
is case-insensitive. |
By default, pages for all architectures are shown. |
By default, pages for all architectures are shown. |
.It Fl s Ar section |
.It Fl s Ar section |
Restrict the search to the specified section of the manual. |
Restrict the search to the specified section of the manual. |
|
|
.Cm = |
.Cm = |
evaluates a substring, while |
evaluates a substring, while |
.Cm \(ti |
.Cm \(ti |
evaluates a regular expression. |
evaluates a case-sensitive extended regular expression. |
.It Fl i Ar term |
.It Fl i Ar term |
If |
If |
.Ar term |
.Ar term |
Line 208 is evaluated case-insensitively. |
|
Line 207 is evaluated case-insensitively. |
|
Has no effect on substring terms. |
Has no effect on substring terms. |
.El |
.El |
.Pp |
.Pp |
Results are sorted according to the following criteria: |
Results are sorted first according to the section number in ascending |
.Bl -enum |
numerical order, then by the page name in ascending |
.It |
|
The manpath directory tree the page is found in, according to the |
|
order specified with |
|
.Fl M , |
|
.Fl m , |
|
the |
|
.Ev MANPATH |
|
environment variable, the |
|
.Xr man.conf 5 |
|
configuration file, or the default documented in |
|
.Xr man.conf 5 . |
|
.It |
|
The section number in ascending numerical order. |
|
.It |
|
The page name in ascending |
|
.Xr ascii 7 |
.Xr ascii 7 |
alphabetical order, case-insensitive. |
alphabetical order, case-insensitive. |
.El |
|
.Pp |
.Pp |
Each output line is formatted as |
Each output line is formatted as |
.Pp |
.Pp |
Line 328 Text production: |
|
Line 311 Text production: |
|
.It Li \&Ox Ta Ox No version reference |
.It Li \&Ox Ta Ox No version reference |
.It Li \&Dx Ta Dx No version reference |
.It Li \&Dx Ta Dx No version reference |
.El |
.El |
|
.Pp |
|
In general, macro keys are supposed to yield complete results without |
|
expecting the user to consider actual macro usage. |
|
For example, results include: |
|
.Pp |
|
.Bl -tag -width 3n -offset 3n -compact |
|
.It Li \&Fa |
|
function arguments appearing on |
|
.Ic \&Fn |
|
lines |
|
.It Li \&Fn |
|
function names marked up with |
|
.Ic \&Fo |
|
macros |
|
.It Li \&In |
|
include file names marked up with |
|
.Ic \&Fd |
|
macros |
|
.It Li \&Vt |
|
types appearing as function return types and |
|
.It \& |
|
types appearing in function arguments in the SYNOPSIS |
|
.El |
.Sh ENVIRONMENT |
.Sh ENVIRONMENT |
.Bl -tag -width MANPAGER |
.Bl -tag -width MANPAGER |
.It Ev MANPAGER |
.It Ev MANPAGER |
|
|
.Qq .cf |
.Qq .cf |
as a substring of manual names and descriptions: |
as a substring of manual names and descriptions: |
.Pp |
.Pp |
.Dl $ apropos .cf |
.Dl $ apropos =.cf |
.Pp |
.Pp |
Include matches for |
Include matches for |
.Qq .cnf |
.Qq .cnf |
|
|
.Qq .conf |
.Qq .conf |
as well: |
as well: |
.Pp |
.Pp |
.Dl $ apropos .cf .cnf .conf |
.Dl $ apropos =.cf =.cnf =.conf |
.Pp |
.Pp |
Search in names and descriptions using a regular expression: |
Search in names and descriptions using a case-sensitive regular expression: |
.Pp |
.Pp |
.Dl $ apropos \(aq\(tiset.?[ug]id\(aq |
.Dl $ apropos \(aq\(tiset.?[ug]id\(aq |
.Pp |
.Pp |
|
|
.Dl $ apropos \-s 3 Va=optind \-a Va=optarg |
.Dl $ apropos \-s 3 Va=optind \-a Va=optarg |
.Pp |
.Pp |
Do exactly the same as calling |
Do exactly the same as calling |
.Xr whatis 1 |
.Nm whatis |
with the argument |
with the argument |
.Qq ssh : |
.Qq ssh : |
.Pp |
.Pp |
Line 425 The following two invocations are equivalent: |
|
Line 431 The following two invocations are equivalent: |
|
.Xr man 1 , |
.Xr man 1 , |
.Xr re_format 7 , |
.Xr re_format 7 , |
.Xr makewhatis 8 |
.Xr makewhatis 8 |
|
.Sh STANDARDS |
|
The |
|
.Nm |
|
utility is compliant with the |
|
.St -p1003.1-2008 |
|
specification of |
|
.Xr man 1 |
|
.Fl k . |
|
.Pp |
|
All options, the |
|
.Nm whatis |
|
command, support for logical operators, macro keys, |
|
substring matching, sorting of results, the environment variables |
|
.Ev MANPAGER |
|
and |
|
.Ev MANPATH , |
|
the database format, and the configuration file |
|
are extensions to that specification. |
.Sh HISTORY |
.Sh HISTORY |
Part of the functionality of |
Part of the functionality of |
.Nm whatis |
.Nm whatis |