* stardiviner <numbch...@gmail.com> [2011-06-15 00:49:04 +0800]:

> How to set mailcap fot mutt ? I googled it. nothing similar found. 
> I want to let mailcap can use some command like gunzip to get a list of 
> archive. 
> Just like a feature in Ranger file manager. 
> If you know mailcap, can you give me an example. Then I will know how to 
> write them .
> Thanks in advance.

Here is the two lines I use in my ~/.mailcap

ch...@stewie.xaerolimit.net:~$ cat .mailcap
text/html; /usr/bin/links2 -dump -force-html %s
application/pgp-keys; pgp -f < %s ; copiousoutput
ch...@stewie.xaerolimit.net:~$

Keep in mind, that I use mutt strictly on a headless box and I shell in 
to it to read my mail. So I don't have any mailcap settings for example 
to pass pdf's to a viewer (since this box doesn't run X, that wouldn't 
do me any good, although I could do something like pdf2text but that 
never looked right for me.

In your case though, if the file really is gzip, you could do

"application/gzip; gzcat -" ... provided the gzipped file is a textfile, 
else you could gzip -d and pipe it to your reader of choice, if it's 
been tar'd, then tar -xf - | your_reader might be more appropriate.

P.S. I'm still someone new to mailcap, so I might be wrong, there may be 
a better way to do this already. ither way, what ever you do find, post 
it to the list so it can be archived and found later.

-- 
> A: Yes.
> >Q: Are you sure?
> >>A: Because it reverses the logical flow of conversation.
> >>>Q: Why is top posting frowned upon?
> http://xkcd.com/84/ | http://xkcd.com/149/
> GPG: D5B20C0C (6741 8EE4 6C7D 11FB 8DA8  9E4A EECD 9A84 D5B2 0C0C)
------------------------------------------------------------------------

Reply via email to