From owner-freebsd-questions@FreeBSD.ORG Wed Jun 9 00:17:12 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FB471065673 for ; Wed, 9 Jun 2010 00:17:12 +0000 (UTC) (envelope-from sterling@camdensoftware.com) Received: from wh2.interactivevillages.com (wh2.interactivevillages.com [75.125.250.34]) by mx1.freebsd.org (Postfix) with ESMTP id 25B648FC20 for ; Wed, 9 Jun 2010 00:17:11 +0000 (UTC) Received: from 174-21-99-21.tukw.qwest.net ([174.21.99.21] helo=_HOSTNAME_) by wh2.interactivevillages.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1OM8rP-0002aF-EV; Tue, 08 Jun 2010 17:09:36 -0700 Received: by _HOSTNAME_ (sSMTP sendmail emulation); Tue, 08 Jun 2010 17:17:06 -0700 Date: Tue, 8 Jun 2010 17:17:06 -0700 From: Chip Camden To: Mutt User List , FreeBSD Questions Message-ID: <20100609001706.GA14568@libertas.local.camdensoftware.com> Mail-Followup-To: Mutt User List , FreeBSD Questions Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Company: Camden Software Consulting URL: http://camdensoftware.com X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - wh2.interactivevillages.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - camdensoftware.com Cc: Subject: Colors, mutt, termcap/terminfo X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2010 00:17:12 -0000 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