tags 259340 fixed-upstream
thanks

On Wed, Jul 14, 2004 at 03:16:27PM -0400, Alfie Costa wrote:
> On 14 Jul 2004 at 10:09, Colin Watson <[EMAIL PROTECTED]> wrote:
> > I do use apropos' current behaviour sometimes. Would you be happy with
> > an -a option whose long spelling was --all, so that you'd do:
> > 
> >   apropos --all cd dvd
> > 
> > ? I think I could implement that.
> 
> A prefix '-a' would be okay, I was thinking an infix notation would allow 
> logical ANDs combined with ORs, NOTs, etc, but as you say, that sort of full 
> boolean syntax might be excessive.
> 
> Perhaps the long spelling should be '--and'?  'all' wouldn't distinguish 
> whether we're looking for:
> 
> 1) "all strings with 'cd' OR  'dvd'", or 
> 2) "all strings with 'cd' AND 'dvd'.

Fair point. I've implemented this now, so it will be in man-db 2.5.0:

Wed Aug 29 11:57:59 BST 2007  Colin Watson  <[EMAIL PROTECTED]>

        Add an option to apropos to display only items matching all keywords
        (thanks, Alfie Costa; Debian bug #259340).

        * src/whatis.c (args, long_options, main): New -a/--and option for
          apropos.
          (usage): Document it.
          (apropos): Store a count of how many times each item has been seen
          in the hashtable. If --and was given, only display an item if its
          count equals the number of supplied keywords.
          (main): Store the number of supplied keywords. Adjust hash free
          function.
        * man/man1/apropos.man1 (SYNOPSIS, OPTIONS): Document --and.
        * docs/NEWS: Document this.

Cheers,

-- 
Colin Watson                                       [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to