From owner-freebsd-questions Sun Sep 30 15:27:53 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-94-248-46.mmcable.com [24.94.248.46]) by hub.freebsd.org (Postfix) with SMTP id B284837B40B for ; Sun, 30 Sep 2001 15:27:48 -0700 (PDT) Received: (qmail 51674 invoked by uid 100); 30 Sep 2001 22:27:46 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15287.40034.644772.73434@guru.mired.org> Date: Sun, 30 Sep 2001 17:27:46 -0500 To: rene@xs4all.nl Cc: questions@freebsd.org Subject: Re: change colors in man? In-Reply-To: <120742996@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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. 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