8

I've checked out some typical open source project which is using auto-tools. I want to hack a bit on this package, but I would also like to change something in the man-page of the package.

The man-page source is found project-name/doc/project-name.1. I just made a small change, and now I want to preview that change, without having to actually do a make install of the project. How do I do that?

I tried stuff like:

man -M . 1 project-name

But it does not work, neither does the various variations I have tried. This sounds like a simple problem, but I can't seem to find anything by googling on the problem, so I'm hoping someone here can help me out. Thanks.

Bjarke Freund-Hansen
  • 28,728
  • 25
  • 92
  • 135

2 Answers2

18
man -l /path/to/manfile.1

On my system, the output from this command is different from nroff -man file.1 | less. Paragraphs wrap at the edge of the terminal, for instance, rather than at 78 characters.

Flimm
  • 136,138
  • 45
  • 251
  • 267
  • macOS' man doesn't seem to know about the `-l` option, so bonus points for the `nroff` approach. – vmallet Oct 25 '22 at 20:31
10
nroff -man /path/to/manfile.1 | less
R Samuel Klatchko
  • 74,869
  • 16
  • 134
  • 187