Re: Dash in name of a manual page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alex,

At 2024-06-26T01:43:22+0200, Alejandro Colomar wrote:
> On Mon, Jun 24, 2024 at 11:21:59AM GMT, G. Branden Robinson wrote:

> Huh, I had missed your reply somehow.  :(

No worries, you're still pretty fast.  ;-)

> > 1.  The difference matters only on output devices that distinguish
> >     hyphens from minus signs.
> 
> This includes utf8, which is my main output device.

Yes, and not everyone uses a font that shows them the difference so
they're bound to be frustrated anyway.

> And in my head, which feels that there's something wrong, even if few
> people will be affected by it.

Our irritations are to some extent our own prerogatives.  ;-)

> > 3.  In general, Unix systems are case-sensitive.
> 
> And dash/hyphen sensitive.

Only where the character encoding distinguishes them!  The term
"hyphen-minus" was unattested in English until the ISO 8859 committee
found itself dealing with the mess that ANSI X3.4 made.

(That said, I prefer their mess to IBM's.)

> Of course, I don't expect this to be used (or useful) often, or maybe
> ever, but let's be correct.  :)
[...]
> I guess I'll use the escape there [in TH].

I won't stop you.  ;-)

> > > How about SH Name?
> > 
> > I reason differently about this case.
> > 
> > > 	.SH Name
> > man-db seems happy to me.
> 
> So, what's the rule?  The first white-space-delimited \- (that is, the
> \- forms a separate token) is the separator, right?

Strictly, the rule is up to lexgrog(1) or whatever parses man page
documents to build indexes from them.  This is not something over which
a *roff formatter has authority.

lexgrog(1):
     When using the traditional man macro set, a correct NAME section
     looks something like this:

            .SH NAME
            foo \- program to do something

     Some manual pagers require the ‘\-’ to be exactly as shown; mandb
     is more tolerant, but for compatibility with other systems it is
     nevertheless a good idea to retain the backslash.

In practice, man-db's lexgrog accepts a pretty motley stew of
separators.  It maps several patterns to a (whitespace-bounded) "-"
token.

https://gitlab.com/man-db/man-db/-/blob/main/src/lexgrog.l?ref_type=heads#L96
https://gitlab.com/man-db/man-db/-/blob/main/src/lexgrog.l?ref_type=heads#L217

> The pages I was considering writing are keyctl-...(1).  I want to
> separate that huge page into one per subcommand, as git(1) does.

Understood.  People are daunted by gigantic man pages.  groff(7) is
pretty big, but is edged out by ffmpeg(1).  bash(1) leaves both far in
the dust.

zshall(1) is truly staggering.  But that may be cheating.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux