From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout.scc.kit.edu (scc-mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pARID3O1005140 for ; Sun, 27 Nov 2011 13:13:04 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1RUjDp-0007FK-Sz; Sun, 27 Nov 2011 19:13:01 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RUjDp-0004Te-VF for tech@mdocml.bsd.lv; Sun, 27 Nov 2011 19:13:01 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RUjDp-0004TK-Tn for tech@mdocml.bsd.lv; Sun, 27 Nov 2011 19:13:01 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1RUjDp-0004n8-Lh for tech@mdocml.bsd.lv; Sun, 27 Nov 2011 19:13:01 +0100 Date: Sun, 27 Nov 2011 19:13:01 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: whatis(1) Message-ID: <20111127181301.GA15140@iris.usta.de> References: <4ED22A28.6040401@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ED22A28.6040401@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) Hi, Kristaps Dzonsons wrote on Sun, Nov 27, 2011 at 01:16:40PM +0100: > Enclosed is a simple implementation of whatis(1). It's a mode of > apropos(1) where arguments are re-written as > > foo => Nm~^foo$ > > This follows OpenBSD's method; Not really. A cursory look gives me the impression that OpenBSD whatis(1) matches whole words in Nm, case-insentively. However, i didn't really study the details yet. For example: $ whatis man Pod::Man (3p) - Convert POD data to formatted *roff input man (1) - display manual pages man (7) - legacy formatting language for manual pages man.conf (5) - configuration file for man (1) > other systems, like my Mac, search > for both `Nm' and `Nd', but I'm avoiding this for now because I > can't figure out the proper regex for word boundaries Nm~[[:<:]]man[[:>:]] > in multi-word `Nd' strings. Nd~[[:<:]]man[[:>:]] # matches Nd only ~[[:<:]]man[[:>:]] # matches both Nm and Nd > Thoughts? Something like this will be needed, yes. Thanks, Ingo -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv