Date: Tue, 8 Jun 2010 17:17:06 -0700 From: Chip Camden <sterling@camdensoftware.com> To: Mutt User List <mutt-users@mutt.org>, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Colors, mutt, termcap/terminfo Message-ID: <20100609001706.GA14568@libertas.local.camdensoftware.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100609001706.GA14568>