[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Support for boolean queries in apropos
On Wed, 14 Mar 2012, James K. Lowden wrote:
> We do have some prior art. The Bourne shell and test(1) use !, -a, and
> -o. find(1) and nmh use !, -and, and -or. SQL and tcpdump use 'not',
> 'and', and 'or'. Would it be so very bad to use one of those? Surely
> anyone typing "apropos" in a shell has used, or at least will soon use,
> one of those utilities.
I'd like to suggest that spending effort making this too capable is not
necessarily a good idea (except as academic exercise :) as this is a human
interface tool, not a database selector.
apropos(1) is used to show a list of related manpages from which you can
select the one you require, not necessarily to reduce that list to the
single page that you want to read. When the list is small enough that you
can see what you want, that is far enough.
I think just having "-" to exclude would be perfectly fine; there was an
objection to using it as "--" might be required, but if you consider the
% apropos -8 "add new user" -git -ssh
then getopt(3) won't process the excluded terms anyway, since it stops at
the first non-option argument. Just document that you need to say what you
are searching for before you say what you want to exclude :)
Main Index |
Thread Index |