Colors, mutt, termcap/terminfo
Chip Camden
sterling at camdensoftware.com
Wed Jun 9 00:17:12 UTC 2010
I finally got 256 colors working with mutt and zsh on FreeBSD. Even though both of
these programs apparently use terminfo rather than termcap, a termcap
entry must exist for your TERM setting, or they both complain.
I had tried that before, but I was missing one key ingredient. The environment
variable TERMCAP needed to be set to the path of the termcap file, even
if it is /etc/termcap. Apparently, if TERMCAP isn't set, a built-in
termcap table is used instead.
The terminfo setting I wanted was rxvt-256color, which existed in
terminfo but not in termcap. So, I edited /etc/termcap to include a
setting for rxvt-256color, export TERMCAP=/etc/termcap, export
TERM=rxvt-256color, and all is now right with the world.
Of course, I only want to use 256 colors if I'm running under rxvt. So I
wrote a shell script to start mutt that tests for that and sets an
environment variable MUTT_COLORS to the name of a file that includes my
mutt color settings (either .mutt-color256 or .mutt-color8). Then, in
.muttrc:
source "~/$MUTT_COLORS"
--
Sterling (Chip) Camden | camdensoftware.com | chipstips.com | chipsquips.com
More information about the freebsd-questions
mailing list