Re: [PATCH 1/3] doc-diff: fix non-portable 'man' invocation

From
Jeff King <hidden>
Date
2018-08-31 19:49:31
Reply to
Eric Sunshine, 2018-08-31
On Fri, Aug 31, 2018 at 02:33:16AM -0400, Eric Sunshine wrote:
doc-diff invokes 'man' with the -l option to force "local" mode,
however, neither MacOS nor FreeBSD recognize this option. On those
platforms, if the argument to 'man' contains a slash, it is
automatically interpreted as a file specification, so a "local"-like
mode is not needed. And, it turns out, 'man' which does support -l
falls back to enabling -l automatically if it can't otherwise find a
manual entry corresponding to the argument. Since doc-diff always
passes an absolute path of the nroff source file to 'man', the -l
option kicks in anyhow, despite not being specified explicitly.
Therefore, make the invocation portable to the various platforms by
simply dropping -l.
Neat. Today I learned.

Confirmed that this works just fine without "-l" on my system (and that
"./foo.1" is an easy alternative to "man -l" on other systems).

-Peff
Thread (17 messages) 17 messages, 3 authors, last reply 2018-09-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help