#!/bin/sh

# cmutt - script to call mutt after setting TERM to an appropriate value
# Thomas Ribbrock <emgaron@gmx.net>
#
# published under GPL

# set TERM so that mutt will use colours

# only force TERM if the current one doesn't already support
# colour - thanks to Thomas E. Dickey for this tip!
COLORS=`tput colors 2>/dev/null`                                        
if [ -z "$COLORS" -o "$COLORS" = "-1" ] ; then                                              
  TERM=xterm-color                                         
  export TERM
fi                                                                     

exec mutt "$@"
