3 ms·
The author has a nice idea there with generating man pages from the help data entered into the option parser. But he doesn't take it to its natural conclusion b
by kazinator 3y ago
The author has a nice idea there with generating man pages from the help data entered into the option parser. But he doesn't take it to its natural conclusion by then working with Makefiles that generate actual man page files.
If your program can generate its own man page from the option data, you don't need an actual man page file. man takes input from a pipe, e.g.
# useful use of cat: shows man is not accessing a file
cat foo.1 | man -l -
This could be built into your utility:
$ util --man
could spin up the man pager, and pipe the nroff code into it to be rendered.
If you still need man util, that could be a proper, verbose man page.