Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] man pages without the colour



On 12/2/05, Ken Foskey <foskey@xxxxxxxxxxxxxxxx> wrote:
On Fri, 2005-12-02 at 20:14 +1100, Daniel Bush wrote:


> (I'm aware of nroff and groff and /etc/manpath.config; even tried to
> mangle their output using sed)


try man xyz | less

man is context aware and if it not a console (ie pipe) it possibly will
not highlight.



Thanks Ken.
I forgot about directly piping it like that.
But I still got the colour in less.  I was stumped for a while before trying my famous sed mangling-script again:
    man xyz | sed -e 's/.^H//g' | less
and lo! crisp white manpages did materialise before me!
Ugly hack though.

(The ^H may or may not have something to do with the -c flag for nroff)


Daniel.