[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Man-db-devel] Is it possible to disable nroff formatting?

From: Colin Watson
Subject: Re: [Man-db-devel] Is it possible to disable nroff formatting?
Date: Fri, 25 Jan 2019 12:57:02 +0000
User-agent: NeoMutt/20170113 (1.7.2)

On Fri, Jan 25, 2019 at 02:30:10PM +0200, Doron Behar wrote:
> Let's say I have a man pager that takes care of formatting tottally by
> itself. Is it possible to make the `man` command not use `groff` or
> `nroff` at all and just pass the text as is to my `$MANPAGER`?
> I'm looking into creating a vim based manpager that will use several of
> Vim's native formatting features to better display manpages.

A man-db-specific approach would be to call "man -R UTF-8 <page name>".
That emits the source file after decompression and conversion to the
given encoding, and then you can do what you like with it.

If you need to support other man implementations, then you could call
"man -w <page name>" which lists the path name(s) of the source file(s),
and then you can open those yourself.  As far as I know this works on
basically everything other than Illumos, but you'd have to deal with
decompression and possibly encoding conversion yourself.

(Given your description of what you're doing, I'm assuming that it isn't
necessary for this to work literally as a $MANPAGER with no other
configuration, and that you'll be able to control the arguments to "man"
to at least some extent.)

Colin Watson                                       address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]