Follow-up Comment #18, bug #67372 (group groff):

To support (belated, retroactive) future design work on an ancient groff
feature that has been only partially designed and implemented for a long time,
i have run

  $ grep -ER '(^|[^\\])\\[*ABbCDFfgHhkLMmNnOoESsVvwXxYZ]\\' *

on a few manual page trees.  The intent of the regex is to find real-world
examples of escape sequences that (optionally or mandatorily) take delimited
arguments and that have the beginning of another escape sequence right after
the function character, but only if this occurs after a non-backslash
character or at the beginning of an input line.  The "but only" restriction is
essential to suppress noise because abuse of "\\" where the traditional "\e"
or the modern "\[rs]" is intended is extremely widespread (not so much in
OpenBSD base, but almost anywhere else).

There are no matches in OpenBSD base, Xenocara, FreeBSD 14.2 base, or NetBSD
10.1 base.

But there are several hundred matches even in the few ports i happen to have
installed, so likely thousands in the ports tree as a whole.

gnutls-serv(1) contains:

  [...]
  .ie t \
  .ds B-Font [CB]
  .ds I-Font [CI]
  .ds R-Font [CR]
  .el \
  .ds B-Font B
  .ds I-Font I
  .ds R-Font R
  .TH gnutls-serv 1 "09 Jul 2025" "3.8.10" "User Commands"
  .SH NAME
  \f\*[B-Font]gnutls-serv\fP
  \- GnuTLS server
  .SH SYNOPSIS
  \f\*[B-Font]gnutls-serv\fP
  .\" Mixture of short (flag) options and long options
  [\f\*[B-Font]\-flags\f[]]
  [\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
  [\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
  [,,,]

I don't think that code is doing what the manual page authors seem to hope it
would be doing, but it clearly intends to interpolate the "[" argument
delimiter into an \f sequence.

The same idiom is present in ocsptool(1), p11tool(1) and several other pages
in the gnutls package.

Judging from
https://gitlab.com/gnutls/gnutls/-/blob/master/doc/manpages/Makefile.am ,
they are using https://gitlab.com/gnutls/cligen to generate the man(7) code.
Apparently, not to be confused with https://github.com/clicon/cligen
nor with https://github.com/c-blake/cligen
nor with https://pypi.org/project/cligen/ .

But i'd be somewhat surprised if the gnutls folks were the only ones doing
something like that.
I wouldn't expect much of the kind in mdoc(7) documents, but likely more in
man(7) documents.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67372>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to