Contributed by tbert on from the search me, man! dept.
Not one to get lost in the OpenSSL/m2k14 shuffle, Ingo Schwarze (schwarze@) has, after much work and improvement, updated the man page search functionality:
Date: Fri, 18 Apr 2014 04:00:48 -0600 (MDT) From: Ingo Schwarze
To: firstname.lastname@example.org Subject: CVS: cvs.openbsd.org: src CVSROOT: /cvs Module name: src Changes by: email@example.com 2014/04/18 04:00:48 Modified files: etc : weekly libexec : Makefile usr.bin : Makefile usr.bin/mandoc : Makefile usr.sbin/pkg_add/OpenBSD: Add.pm Delete.pm Paths.pm PkgCreate.pm share/man : Makefile share/man/man8 : daily.8 Log message: Switch to the new makewhatis(8)/apropos(1)/whatis(1) combo. "commit the switch now" espie@ "go for it" deraadt@ See the apropos(1) manual for a description of what's new. On machines where you want the full functionality, run "sudo makewhatis" and put "MAKEWHATISARGS=' '" into weekly.local(8). Otherwise, when upgrading via source, run "sudo makewhatis -Q".
Users now have a powerful tool with which to more easily find information in the already-superb documentation. To quote the apropos(1) man page:
The apropos utility queries manual page databases generated by makewhatis(8), evaluating [the search] expression for each file in each database...Queries evaluate over a subset of mdoc(7) macros indexed by makewhatis(8).
The EXAMPLES section displays some of the wealth of possibilities:
Search for ".cf" as a substring of manual names and descriptions: $ apropos .cf Include matches for ".cnf" and ".conf" as well: $ apropos .cf .cnf .conf Search in names and descriptions using a regular expression: $ apropos '~set.?[ug]id' Search for manuals in the library section mentioning both the "optind" and the "optarg" variables: $ apropos -s 3 Va=optind -a Va=optarg Do exactly the same as calling whatis(1) with the argument "ssh": $ apropos -- -i 'Nm~[[:<:]]ssh[[:>:]]' The following two invocations are equivalent: $ apropos -S arch -s section expression $ apropos \( expression \) -a arch~^(arch|any)$ -a sec~^section$
For those of you attending BSDCan, Ingo will be presenting a talk that goes into much more depth about the improvements he's been making.
(Comments are closed)