Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Sep 2001 17:27:46 -0500
From:      Mike Meyer <mwm@mired.org>
To:        rene@xs4all.nl
Cc:        questions@freebsd.org
Subject:   Re: change colors in man?
Message-ID:  <15287.40034.644772.73434@guru.mired.org>
In-Reply-To: <120742996@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
rene@xs4all.nl types:
> Hi. I'm working on making my shells color-enabled; next in line is 'man',
> which has 'wrong' colors when viewed on a all-white background.. :(
> I am only using SSH + bash, nothing x-termy-like ;)
> Can anyone point me to some documentation on this issue?

Yup. The man, nroff, groff, grotty and more man pages are all
relevant.

man uses nroff, which is a shell script that invokes groff with one of
the character output drivers, which then uses grotty to produce that
actual output. That is piped through more, which recognizes the the
hardcopy underline & control sequences, and turns them into the bold
and underline sequences for your terminal.

I think you have three choices:

    1)  Change your terminal type to one that uses the colors you want
	for bold and underline, which are the only ones used. This will
	change the behavior of all programs that use those terminal
	features.

    2)  Change your PAGER variable to something that recognizes those
        hardcopy sequences and changes them to the codes that you want,
	then passes that to "more -rs". Note that this will change the
	behavior of all programs that use the PAGER variable to page
	through text.

    3)  Create a new groff device (ansi?) that does what you want.
	You can probably start with grotty. Disable the saving of
	formatted man pages, and change the /usr/bin/nroff script to
	use this driver if you're on the proper device.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Q: How do you make the gods laugh?		A: Tell them your plans.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15287.40034.644772.73434>