[CC += Colin] Hi Branden,
On Mon, Aug 25, 2025 at 06:04:20PM -0500, G. Branden Robinson wrote: > Hi Alex & Helge, > > tl;dr: Learn and use the "-rU0" option when your terminal device doesn't > support OSC 8 hyperlinks. > > groff_man(7): > -rU0 Disable generation of URI hyperlinks in output drivers > capable of them, making the arguments to MT and UR calls > visible as formatted text. grohtml(1), gropdf(1), and > grotty(1) enable hyperlinks by default (the last only if > not in its legacy output mode). > > If you _never_ use a terminal device that supports hyperlinking... > > groff_man(7): > /.../share/groff/site-tmac/man.local > Put siteālocal changes and customizations into this file. > > Thus, Helge might add > > .if n .nr U 0 \" Format URLs on terminal devices. > > to his system's "man.local" file. [...] > > I can confirm. Branden, is this a bug? I think the Linux console > > should print the URI as in the old days. > > I can't reproduce that behavior with groff 1.23.0 but I can with Git. > > And that's due to a deliberate change. > > NEWS[1]: > * Hyperlink support is now enabled by default on PDF and terminal > devices for an (man) and doc (mdoc) documents. Instructions and > commented code for disabling it are in the "man.local" and > "mdoc.local" files. > > For the moment, groff's hands are kind of tied. To get this feature to > Just Work(TM) with no user involvement requires three things to happen. > > 1. grotty(1) needs to become a terminfo application. Lennart Jablonka [...] > > 2. Once we have a tricked-out, terminfo-aware grotty, we meet another > problem: > > There is no terminfo capability advertising OSC 8 hyperlink support. [...] > 3. Even once we have a grotty(1) that knows whether the terminal device > can render hyperlinks or not, we have yet another problem: [...] > Thus, the formatted content of a document can depend on > properties of the output device in a new way, one more, uh, > "exciting" than the ~1972 binary choice of "is this an nroff device > [~terminal/typewriter]?" or "is this a troff device [typesetter]?", > or the ~1980 parameter "what is the name of the output device?" > (such as [Kernighan troff] "post", "l202", or [groff] "ps", "pdf", > "utf8"). Hmmmm, that sounds not good at all. How about moving this to man(1)? That is, man(1) knows whether it is being piped or not, and thus can tell groff(1) to do OSC8 or not. And even for the case of the terminal, it is in a better position to pass the information to groff(1); we'd still need points 1 (modified for man(1)) and 2, but not 3, which is very ugly. Have a lovely day! Alex -- <https://www.alejandro-colomar.es/>
signature.asc
Description: PGP signature