On 25 July 2017 at 23:49, Colin Watson <cjwat...@debian.org> wrote:

> On Tue, Jul 25, 2017 at 11:24:18PM +0100, Reuben Thomas wrote:
> > I just noticed that man pages installed in ~/.local/share/man are not
> found
> > by apropos. This appears to be because there’s no database for this
> > directory. man finds the directory via the corresponding ~/.local/bin
> entry
> > in PATH. It would be nice if apropos worked too.
>
> Have you tried just running mandb as your user?  That should create a
> suitable database.
>

​That's great, thanks.​ However, the beauty of man itself is that it just
works.

mandb isn't automatically run when man pages are installed, so it doesn't.

​I can get nearly as good a result by adding a user cron job that runs
mandb daily (and I'll do that, because I'll forget about this problem!),
but that's still not as good as the way man simply works without any action
on my part.

> Since a workaround is to use man -K, how about defaulting -k to try
> > the -K method where no database or whatis file is found?
>
> -K searches rather a lot more of the page text than -k does, though, so
> will often give dramatically different results.
>

​In this case, it would simply give some results (only being run on
directories on which otherwise man would give up), which, I submit, is
better than no results.

-- 
https://rrt.sc3d.org <http://rrt.sc3d.org>

Reply via email to