nice man pages?

Carl Johnson carlj at peak.org
Wed Oct 26 17:49:47 UTC 2011


Carl Johnson <carlj at peak.org> writes:

> Patrick Lamaiziere <patfbsd at davenulle.org> writes:
>
>> Hello,
>>
>> I use sysutils/most to have nice manual pages in color, that's cool but
>> is there a way to do this with the base system (ie without adding port)?
>
> I use a colorized termcap with less, but it also works with
> /usr/bin/more.  It depends on what type of terminal you are using it
> on.  I have it for xterm and rxvt (which is what I use).  This works for
> manpages, but you can also colorize your prompt.

Obviously I hadn't thought that through since there is no xterm in the
base system, but both the xterm and rxvt termcap entries seem to work on
the console.  Just to be sure I made up a colorized cons25 entry.  I
left in the underline attribute, even though the console doesn't seem to
support underline.  I also added the nc capability that Thomas Dickey
suggested should be used.  The revised version of my ~/.termcap is below
if anybody is interested:

-------- start ~/.termcap -------------
# these are just changes to the standard FreeBSD termcap - 2010-12-13 cdj
# added cons25 and nc capability - 2011-10-26 cdj

xterm|xterm-color|X11 terminal emulator:\
        :md=\E[33;1m:so=\E[36;1m:se=\E[0m:us=\E[32;4m:ue=\E[0;24m:nc#35:\
        :ti@:te@:tc=xterm-xfree86:

rxvt|rxvt terminal emulator (X Window System):\
        :md=\E[33;1m:so=\E[36;1m:se=\E[0m:us=\E[32;4m:ue=\E[0;24m:nc#35:\
        :pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:\
        :tc=rxvt-mono:

cons25|colorized version of cons25|:\
        :md=\E[33;1m:so=\E[36;1m:se=\E[0m:us=\E[32;4m:ue=\E[0;24m:nc#35:\
        :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261i^U0\333y\363z\362:\
        :tc=cons25w:
-------- end ~/.termcap -------------

Note that the ac capability in cons25 should be a single (long) line.

-- 
Carl Johnson		carlj at peak.org



More information about the freebsd-questions mailing list