tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: Re: whatis(1)
Date: Sun, 27 Nov 2011 19:13:01 +0100	[thread overview]
Message-ID: <20111127181301.GA15140@iris.usta.de> (raw)
In-Reply-To: <4ED22A28.6040401@bsd.lv>

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

  reply	other threads:[~2011-11-27 18:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-27 12:16 whatis(1) Kristaps Dzonsons
2011-11-27 18:13 ` Ingo Schwarze [this message]
2011-11-27 18:56   ` whatis(1) Kristaps Dzonsons
2011-11-28  0:35     ` whatis(1) Ingo Schwarze
2011-11-28  8:42       ` whatis(1) Kristaps Dzonsons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111127181301.GA15140@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).