I’ve been running Mutt with Visor, so my mail is in a drop-down Terminal window. That makes Mutt the width of my whole screen. It’s good for subject lines and stupidly deep threads, but unwrapped mail text ends up way too wide.

Add this to your .muttrc:

set wrapmargin=`C=$(($(tput cols) - 80)); test $C -lt 0 && C=0; echo $C`

Is there a better way to round up to zero in Bash?

13 March 2007