On 2009-10-28, Horacio Sanson <[email protected]> wrote:
> Does anyone know how to make mutt display patches/diff files in color?
>
> I am using pygmentize that in a terminal outputs the diff/patch files with
> easy to read
> colors but when used from within mutt the text is displayed correctly but not
> colored.
>
> Here is my configuration:
>
> My .mailcap file:
>
> text/x-diff;pygmentize -f console %s;copiousoutput
> text/x-patch;pygmentize -f console %s;copiousoutput
>
> My .muttrc file:
>
> auto_view text/x-diff
> auto_view text/x-patch
>
>
> I can see in Mutt that the pygmentize command is being called but the output
> text is not colored on the console.
Try this in your .muttrc:
set allow_ansi
> As second question how do I change the mime type of received emails based on
> extension? without using procmail? Some times I get patches/diff with
> mime-type
> set to plain/text and I want to change them to text/x-patch or text/x-diff
> based on extension.
This was originally intended for application/octet-stream but was
generalized to handle other MIME types. I don't know whether it
will work for text/plain. Look in the mutt manual for
'mime_lookup'.
HTH,
Gary