1*e6b7ae41Sschwarze.\" $Id: apropos.1,v 1.24 2014/04/24 00:28:02 schwarze Exp $ 28dbd610cSschwarze.\" 3a5ccd03aSschwarze.\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> 4a5ccd03aSschwarze.\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org> 58dbd610cSschwarze.\" 68dbd610cSschwarze.\" Permission to use, copy, modify, and distribute this software for any 78dbd610cSschwarze.\" purpose with or without fee is hereby granted, provided that the above 88dbd610cSschwarze.\" copyright notice and this permission notice appear in all copies. 98dbd610cSschwarze.\" 108dbd610cSschwarze.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 118dbd610cSschwarze.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 128dbd610cSschwarze.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 138dbd610cSschwarze.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 148dbd610cSschwarze.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 158dbd610cSschwarze.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 168dbd610cSschwarze.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 178dbd610cSschwarze.\" 18*e6b7ae41Sschwarze.Dd $Mdocdate: April 24 2014 $ 198dbd610cSschwarze.Dt APROPOS 1 208dbd610cSschwarze.Os 218dbd610cSschwarze.Sh NAME 228dbd610cSschwarze.Nm apropos 2327255502Sschwarze.Nd search manual page databases 248dbd610cSschwarze.Sh SYNOPSIS 258dbd610cSschwarze.Nm 2624547daeSschwarze.Op Fl C Ar file 27de7b08f2Sschwarze.Op Fl M Ar path 28de7b08f2Sschwarze.Op Fl m Ar path 298ed73071Sschwarze.Op Fl O Ar outkey 303ba7b54dSschwarze.Op Fl S Ar arch 313ba7b54dSschwarze.Op Fl s Ar section 32b79d4660Sschwarze.Ar expression ... 338dbd610cSschwarze.Sh DESCRIPTION 348dbd610cSschwarzeThe 358dbd610cSschwarze.Nm 3627255502Sschwarzeutility queries manual page databases generated by 37b8f15b54Sschwarze.Xr makewhatis 8 , 38e0301041Sschwarzeevaluating 39b79d4660Sschwarze.Ar expression 4027255502Sschwarzefor each file in each database. 41e0301041SschwarzeBy default, it displays the names, section numbers, and description lines 42e0301041Sschwarzeof all matching manuals. 435a2d92daSschwarze.Pp 445a2d92daSschwarzeBy default, 455a2d92daSschwarze.Nm 465a2d92daSschwarzesearches for 47b8f15b54Sschwarze.Xr makewhatis 8 485a2d92daSschwarzedatabases in the default paths stipulated by 49e0301041Sschwarze.Xr man 1 50e0301041Sschwarzeand uses case-insensitive substring matching 51e0301041Sschwarze.Pq the Cm = No operator 525a2d92daSschwarzeover manual names and descriptions 535a2d92daSschwarze.Pq the Li \&Nm No and Li \&Nd No macro keys . 545a2d92daSschwarzeMultiple terms imply pairwise 555a2d92daSschwarze.Fl o . 565a2d92daSschwarze.Pp 578dbd610cSschwarzeIts arguments are as follows: 588dbd610cSschwarze.Bl -tag -width Ds 5924547daeSschwarze.It Fl C Ar file 6024547daeSschwarzeSpecify an alternative configuration 6124547daeSschwarze.Ar file 6224547daeSschwarzein 6324547daeSschwarze.Xr man.conf 5 6424547daeSschwarzeformat. 65de7b08f2Sschwarze.It Fl M Ar path 6627255502SschwarzeUse the colon-separated path instead of the default list of paths 6727255502Sschwarzesearched for 68b8f15b54Sschwarze.Xr makewhatis 8 6927255502Sschwarzedatabases. 7027255502SschwarzeInvalid paths, or paths without manual databases, are ignored. 71de7b08f2Sschwarze.It Fl m Ar path 7227255502SschwarzePrepend the colon-separated paths to the list of paths searched 7327255502Sschwarzefor 74b8f15b54Sschwarze.Xr makewhatis 8 7527255502Sschwarzedatabases. 7627255502SschwarzeInvalid paths, or paths without manual databases, are ignored. 778ed73071Sschwarze.It Fl O Ar outkey 788ed73071SschwarzeShow the values associated with the key 798ed73071Sschwarze.Ar outkey 808ed73071Sschwarzeinstead of the manual descriptions. 813ba7b54dSschwarze.It Fl S Ar arch 82de7b08f2SschwarzeRestrict the search to pages for the specified 83de7b08f2Sschwarze.Xr machine 1 84de7b08f2Sschwarzearchitecture. 85de7b08f2Sschwarze.Ar arch 86de7b08f2Sschwarzeis case insensitive. 87de7b08f2SschwarzeBy default, pages for all architectures are shown. 88de7b08f2Sschwarze.It Fl s Ar section 89de7b08f2SschwarzeRestrict the search to the specified section of the manual. 90de7b08f2SschwarzeBy default, pages from all sections are shown. 918dbd610cSschwarzeSee 928dbd610cSschwarze.Xr man 1 93de7b08f2Sschwarzefor a listing of sections. 94b79d4660Sschwarze.El 95b79d4660Sschwarze.Pp 96b79d4660SschwarzeAn 97b79d4660Sschwarze.Ar expression 98b79d4660Sschwarzeconsists of search terms joined by logical operators 99b79d4660Sschwarze.Fl a 100b79d4660Sschwarze.Pq and 101b79d4660Sschwarzeand 102b79d4660Sschwarze.Fl o 103b79d4660Sschwarze.Pq or . 104b79d4660SschwarzeThe 105b79d4660Sschwarze.Fl a 106b79d4660Sschwarzeoperator has precedence over 107b79d4660Sschwarze.Fl o 108b79d4660Sschwarzeand both are evaluated left-to-right. 109b79d4660Sschwarze.Bl -tag -width Ds 110b79d4660Sschwarze.It \&( Ar expr No \&) 111b79d4660SschwarzeTrue if the subexpression 112b79d4660Sschwarze.Ar expr 113b79d4660Sschwarzeis true. 114b79d4660Sschwarze.It Ar expr1 Fl a Ar expr2 115b79d4660SschwarzeTrue if both 116b79d4660Sschwarze.Ar expr1 117b79d4660Sschwarzeand 118b79d4660Sschwarze.Ar expr2 119b79d4660Sschwarzeare true (logical 120e0301041Sschwarze.Sq and ) . 121b79d4660Sschwarze.It Ar expr1 Oo Fl o Oc Ar expr2 122b79d4660SschwarzeTrue if 123b79d4660Sschwarze.Ar expr1 124b79d4660Sschwarzeand/or 125b79d4660Sschwarze.Ar expr2 126b79d4660Sschwarzeevaluate to true (logical 127e0301041Sschwarze.Sq or ) . 128b79d4660Sschwarze.It Ar term 129b79d4660SschwarzeTrue if 130b79d4660Sschwarze.Ar term 131b79d4660Sschwarzeis satisfied. 132b79d4660SschwarzeThis has syntax 133e0301041Sschwarze.Sm off 134e0301041Sschwarze.Oo 135e0301041Sschwarze.Op Ar key Op , Ar key ... 136e0301041Sschwarze.Pq Cm = | ~ 137e0301041Sschwarze.Oc 138*e6b7ae41Sschwarze.Ar val , 139*e6b7ae41Sschwarze.Sm on 140e0301041Sschwarzewhere 141e0301041Sschwarze.Ar key 142b79d4660Sschwarzeis an 143b79d4660Sschwarze.Xr mdoc 7 144b79d4660Sschwarzemacro to query and 145e0301041Sschwarze.Ar val 146b79d4660Sschwarzeis its value. 147386c790fSschwarzeSee 148386c790fSschwarze.Sx Macro Keys 149386c790fSschwarzefor a list of available keys. 150b79d4660SschwarzeOperator 151e0301041Sschwarze.Cm = 152b79d4660Sschwarzeevaluates a substring, while 153e0301041Sschwarze.Cm ~ 154b79d4660Sschwarzeevaluates a regular expression. 155b79d4660Sschwarze.It Fl i Ar term 156990911a9SschwarzeIf 157b79d4660Sschwarze.Ar term 158990911a9Sschwarzeis a regular expression, it 159b79d4660Sschwarzeis evaluated case-insensitively. 160990911a9SschwarzeHas no effect on substring terms. 1618dbd610cSschwarze.El 1628dbd610cSschwarze.Pp 163e0301041SschwarzeResults are sorted by manual sections and names, with output formatted as 1648dbd610cSschwarze.Pp 165e0301041Sschwarze.D1 name[, name...](sec) \- description 1668dbd610cSschwarze.Pp 1678dbd610cSschwarzeWhere 168e0301041Sschwarze.Dq name 169e0301041Sschwarzeis the manual's name, 170e0301041Sschwarze.Dq sec 1713ba7b54dSschwarzeis the manual section, and 172e0301041Sschwarze.Dq description 1738dbd610cSschwarzeis the manual's short description. 1748dbd610cSschwarzeIf an architecture is specified for the manual, it is displayed as 1758dbd610cSschwarze.Pp 176e0301041Sschwarze.D1 name(sec/arch) \- description 1778dbd610cSschwarze.Pp 1788dbd610cSschwarzeResulting manuals may be accessed as 1798dbd610cSschwarze.Pp 180e0301041Sschwarze.Dl $ man \-s sec name 1818dbd610cSschwarze.Pp 1828dbd610cSschwarzeIf an architecture is specified in the output, use 1838dbd610cSschwarze.Pp 184e0301041Sschwarze.Dl $ man \-s sec \-S arch name 185386c790fSschwarze.Ss Macro Keys 186386c790fSschwarzeQueries evaluate over a subset of 187386c790fSschwarze.Xr mdoc 7 188386c790fSschwarzemacros indexed by 189b8f15b54Sschwarze.Xr makewhatis 8 . 190386c790fSschwarzeIn addition to the macro keys listed below, the special key 191386c790fSschwarze.Cm any 192386c790fSschwarzemay be used to match any available macro key. 193386c790fSschwarze.Pp 194386c790fSschwarzeNames and description: 195386c790fSschwarze.Bl -column "xLix" description -offset indent -compact 196386c790fSschwarze.It Li \&Nm Ta manual name 197386c790fSschwarze.It Li \&Nd Ta one-line manual description 1988ed73071Sschwarze.It Li arch Ta machine architecture (case-insensitive) 1998ed73071Sschwarze.It Li sec Ta manual section number 200386c790fSschwarze.El 201386c790fSschwarze.Pp 202386c790fSschwarzeSections and cross references: 203386c790fSschwarze.Bl -column "xLix" description -offset indent -compact 204386c790fSschwarze.It Li \&Sh Ta section header (excluding standard sections) 205386c790fSschwarze.It Li \&Ss Ta subsection header 206386c790fSschwarze.It Li \&Xr Ta cross reference to another manual page 207386c790fSschwarze.It Li \&Rs Ta bibliographic reference 208386c790fSschwarze.El 209386c790fSschwarze.Pp 210386c790fSschwarzeSemantic markup for command line utilities: 211386c790fSschwarze.Bl -column "xLix" description -offset indent -compact 212386c790fSschwarze.It Li \&Fl Ta command line options (flags) 213386c790fSschwarze.It Li \&Cm Ta command modifier 214386c790fSschwarze.It Li \&Ar Ta command argument 215386c790fSschwarze.It Li \&Ic Ta internal or interactive command 216386c790fSschwarze.It Li \&Ev Ta environmental variable 217386c790fSschwarze.It Li \&Pa Ta file system path 218386c790fSschwarze.El 219386c790fSschwarze.Pp 220386c790fSschwarzeSemantic markup for function libraries: 221386c790fSschwarze.Bl -column "xLix" description -offset indent -compact 222386c790fSschwarze.It Li \&Lb Ta function library name 223386c790fSschwarze.It Li \&In Ta include file 224386c790fSschwarze.It Li \&Ft Ta function return type 225386c790fSschwarze.It Li \&Fn Ta function name 226386c790fSschwarze.It Li \&Fa Ta function argument type and name 227386c790fSschwarze.It Li \&Vt Ta variable type 228386c790fSschwarze.It Li \&Va Ta variable name 229386c790fSschwarze.It Li \&Dv Ta defined variable or preprocessor constant 230386c790fSschwarze.It Li \&Er Ta error constant 231386c790fSschwarze.It Li \&Ev Ta environmental variable 232386c790fSschwarze.El 233386c790fSschwarze.Pp 234386c790fSschwarzeVarious semantic markup: 235386c790fSschwarze.Bl -column "xLix" description -offset indent -compact 236386c790fSschwarze.It Li \&An Ta author name 237386c790fSschwarze.It Li \&Lk Ta hyperlink 238386c790fSschwarze.It Li \&Mt Ta Do mailto Dc hyperlink 239386c790fSschwarze.It Li \&Cd Ta kernel configuration declaration 240386c790fSschwarze.It Li \&Ms Ta mathematical symbol 241386c790fSschwarze.It Li \&Tn Ta tradename 242386c790fSschwarze.El 243386c790fSschwarze.Pp 244386c790fSschwarzePhysical markup: 245386c790fSschwarze.Bl -column "xLix" description -offset indent -compact 246386c790fSschwarze.It Li \&Em Ta italic font or underline 247386c790fSschwarze.It Li \&Sy Ta boldface font 248386c790fSschwarze.It Li \&Li Ta typewriter font 249386c790fSschwarze.El 250386c790fSschwarze.Pp 251386c790fSschwarzeText production: 252386c790fSschwarze.Bl -column "xLix" description -offset indent -compact 253386c790fSschwarze.It Li \&St Ta reference to a standards document 254386c790fSschwarze.It Li \&At Ta At No version reference 255386c790fSschwarze.It Li \&Bx Ta Bx No version reference 256386c790fSschwarze.It Li \&Bsx Ta Bsx No version reference 257386c790fSschwarze.It Li \&Nx Ta Nx No version reference 258386c790fSschwarze.It Li \&Fx Ta Fx No version reference 259386c790fSschwarze.It Li \&Ox Ta Ox No version reference 260386c790fSschwarze.It Li \&Dx Ta Dx No version reference 261386c790fSschwarze.El 26227255502Sschwarze.Sh ENVIRONMENT 263de7b08f2Sschwarze.Bl -tag -width MANPATH 26427255502Sschwarze.It Ev MANPATH 265de7b08f2SschwarzeThe standard search path used by 266de7b08f2Sschwarze.Xr man 1 267de7b08f2Sschwarzemay be changed by specifying a path in the 268de7b08f2Sschwarze.Ev MANPATH 269de7b08f2Sschwarzeenvironment variable. 27027255502SschwarzeInvalid paths, or paths without manual databases, are ignored. 27127255502SschwarzeOverridden by 27227255502Sschwarze.Fl M . 2730f34e0a0SschwarzeIf 2740f34e0a0Sschwarze.Ev MANPATH 275de7b08f2Sschwarzebegins with a colon, it is appended to the default list; 276de7b08f2Sschwarzeif it ends with a colon, it is prepended to the default list; 277de7b08f2Sschwarzeor if it contains two adjacent colons, 278de7b08f2Sschwarzethe standard search path is inserted between the colons. 279de7b08f2SschwarzeIf none of these conditions are met, it overrides the 280de7b08f2Sschwarzestandard search path. 28127255502Sschwarze.El 28224547daeSschwarze.Sh FILES 28324547daeSschwarze.Bl -tag -width "/etc/man.conf" -compact 284800aa914Sschwarze.It Pa mandoc.db 28524547daeSschwarzename of the 286b8f15b54Sschwarze.Xr makewhatis 8 28724547daeSschwarzekeyword database 28824547daeSschwarze.It Pa /etc/man.conf 28924547daeSschwarzedefault 29024547daeSschwarze.Xr man 1 29124547daeSschwarzeconfiguration file 29224547daeSschwarze.El 2938dbd610cSschwarze.Sh EXIT STATUS 2948dbd610cSschwarze.Ex -std 2958dbd610cSschwarze.Sh EXAMPLES 2968dbd610cSschwarzeSearch for 297620872beSschwarze.Qq .cf 298620872beSschwarzeas a substring of manual names and descriptions: 299b79d4660Sschwarze.Pp 300620872beSschwarze.Dl $ apropos .cf 301b79d4660Sschwarze.Pp 302990911a9SschwarzeInclude matches for 303620872beSschwarze.Qq .cnf 304990911a9Sschwarzeand 305620872beSschwarze.Qq .conf 306620872beSschwarzeas well: 307b79d4660Sschwarze.Pp 308620872beSschwarze.Dl $ apropos .cf .cnf .conf 309b79d4660Sschwarze.Pp 310620872beSschwarzeSearch in names and descriptions using a regular expression: 311620872beSschwarze.Pp 312620872beSschwarze.Dl $ apropos '~set.?[ug]id' 313620872beSschwarze.Pp 314e0301041SschwarzeSearch for manuals in the library section mentioning both the 3158dbd610cSschwarze.Qq optind 316620872beSschwarzeand the 317b79d4660Sschwarze.Qq optarg 318620872beSschwarzevariables: 3198dbd610cSschwarze.Pp 320620872beSschwarze.Dl $ apropos \-s 3 Va=optind \-a Va=optarg 321620872beSschwarze.Pp 322620872beSschwarzeDo exactly the same as calling 323620872beSschwarze.Xr whatis 1 324620872beSschwarzewith the argument 325620872beSschwarze.Qq ssh : 326620872beSschwarze.Pp 327620872beSschwarze.Dl $ apropos \-\- \-i 'Nm~[[:<:]]ssh[[:>:]]' 3288ed73071Sschwarze.Pp 3298ed73071SschwarzeThe following two invocations are equivalent: 3308ed73071Sschwarze.Pp 3318ed73071Sschwarze.D1 Li $ apropos -S Ar arch Li -s Ar section expression 3328ed73071Sschwarze.Bd -ragged -offset indent 3338ed73071Sschwarze.Li $ apropos \e( Ar expression Li \e) 3348ed73071Sschwarze.Li -a arch~^( Ns Ar arch Ns Li |any)$ 3358ed73071Sschwarze.Li -a sec~^ Ns Ar section Ns Li $ 3368ed73071Sschwarze.Ed 3378dbd610cSschwarze.Sh SEE ALSO 3388dbd610cSschwarze.Xr man 1 , 339990911a9Sschwarze.Xr re_format 7 , 340b8f15b54Sschwarze.Xr makewhatis 8 341082ba4baSschwarze.Sh HISTORY 342082ba4baSschwarzeAn 3438dbd610cSschwarze.Nm 344082ba4baSschwarzeutility first appeared in 345082ba4baSschwarze.Bx 2 . 346082ba4baSschwarzeIt was rewritten from scratch for 3478ed73071Sschwarze.Ox 5.6 . 348082ba4baSschwarze.Pp 349082ba4baSschwarzeThe 350082ba4baSschwarze.Fl M 351082ba4baSschwarzeoption and the 352082ba4baSschwarze.Ev MANPATH 353082ba4baSschwarzevariable first appeared in 354082ba4baSschwarze.Bx 4.3 ; 355082ba4baSschwarze.Fl m 356082ba4baSschwarzein 357082ba4baSschwarze.Bx 4.3 Reno ; 358082ba4baSschwarze.Fl C 359082ba4baSschwarzein 360082ba4baSschwarze.Bx 4.4 Lite1 ; 361082ba4baSschwarzeand 362082ba4baSschwarze.Fl S 363082ba4baSschwarzeand 364082ba4baSschwarze.Fl s 365082ba4baSschwarzein 366082ba4baSschwarze.Ox 4.5 . 367082ba4baSschwarze.Sh AUTHORS 368082ba4baSschwarze.An -nosplit 369082ba4baSschwarze.An Bill Joy 370082ba4baSschwarzewrote the original 371082ba4baSschwarze.Bx 372082ba4baSschwarze.Nm 373082ba4baSschwarzein February 1979. 374082ba4baSschwarzeThe current version was written by 3758ed73071Sschwarze.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv 3768ed73071Sschwarzeand 3778ed73071Sschwarze.An Ingo Schwarze Aq Mt schwarze@openbsd.org . 378