[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] groff as the basis for comprehensive documentation?
From: |
Colin Watson |
Subject: |
Re: [groff] groff as the basis for comprehensive documentation? |
Date: |
Thu, 19 Apr 2018 10:06:28 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Apr 19, 2018 at 02:28:36AM +0200, Ingo Schwarze wrote:
> Nate Bargmann wrote on Wed, Apr 18, 2018 at 06:52:44PM -0500:
> > I was disappointed that unlike "man" that I find on Slackware or
> > Debian, I had to add an uninstalled man page into the db in order
> > for "mandoc" to open it. Perhaps I missed an option, but the "man"
> > I'm familiar with is capable of opening a file simply by giving it
> > a path name.
>
> That is non-standard behaviour even on GNU/Linux:
>
> $ lsb_release -d
> Description: Debian GNU/Linux 8.10 (jessie)
> $ dpkg-query -l man-db | tail -n 1
> ii man-db 2.7.0.2-5 i386 on-line manual pager
> $ ls *.1
> apropos.1 demandoc.1 man.1 man.options.1 mandoc.1 soelim.1
> $ man apropos.1 # the man-db man(1) implementation
> No manual entry for apropos.1
"man ./apropos.1", as Nate pointed out. man-db's heuristic is that if
the page name contains a slash then it's surely a path name instead and
should be treated as such; I think that's a reasonable one.
> I think it is good that the '-l' ("local") option is required when
> giving a file name in the local directory, or an absolute path.
I agree that man should not try to guess the difference between a page
name and an unadorned file name in the local directory (with no slash),
but when it's an absolute path or a relative path containing a slash,
the situation seems quite clear.
> Besides, with the mandoc implementation of man(1), it is not
> absolutely required to update the database even after installing a
> new page into /usr/share/man/.
You can also leave out the qualifier clause there: this is true of the
man-db implementation too. (It used to not be true, but I fixed that
long ago, back in 2002 or so.)
--
Colin Watson address@hidden