# $Id: mailcap 2520 2007-06-08 16:36:49Z agriffis $ #--------------------------------------------------------------------------- # NB: This mailcap is slightly simplified from my personal mailcap posted at # http://n01se.net/agriffis/skel.hg/?raw-file/tip/mailcap # In particular, mailcap_bg is left out since it isn't appropriate for # a system mailcap. #--------------------------------------------------------------------------- # # Some good help on writing a .mailcap file can be found at # http://www.mutt.org/doc/manual/manual-5.html # # Netscape Navigator 4.76 (and probably other versions) ignores lines # that contain a test= portion. Also, Netscape uses the last # listed entry for a given mimetype, so order matters. For these reasons, # Netscape support has become too annoying to continue to worry about it. # Note regarding %s in different contexts: # In test= context, %s is the filename specified in the MIME header. If there # is no name specified, then %s will resolve to blank (and will not even be # quoted as an empty argument by mutt). For example: # Content-Type: application/x-msdownload; name="pack276.exe" # # In viewer context, %s is the temporary filename created by mutt. It will # almost certainly be different from the name used in test= context since it # will be a temporary file. Unless nametemplate= is specified, the extension # of the temporary file will not be significant and should be ignored by the # viewer. Additionally %s should never be blank in viewer context. text/html; firefox %s ; nametemplate=%s.html ; test=test -n "$DISPLAY" && which firefox >/dev/null 2>&1 text/html; mozilla %s ; nametemplate=%s.html ; test=test -n "$DISPLAY" && which mozilla >/dev/null 2>&1 text/html; links2 %s ; nametemplate=%s.html ; needsterminal ; test=which links2 >/dev/null 2>&1 text/html; elinks %s ; nametemplate=%s.html ; needsterminal ; test=which elinks >/dev/null 2>&1 text/html; links %s ; nametemplate=%s.html ; needsterminal ; test=which links >/dev/null 2>&1 text/html; w3m %s ; nametemplate=%s.html ; needsterminal ; test=which w3m >/dev/null 2>&1 text/html; dumptext links2 %s ; nametemplate=%s.html ; copiousoutput ; test=which links2 >/dev/null 2>&1 text/html; dumptext elinks %s ; nametemplate=%s.html ; copiousoutput ; test=which elinks >/dev/null 2>&1 text/html; dumptext links %s ; nametemplate=%s.html ; copiousoutput ; test=which links >/dev/null 2>&1 text/html; dumptext w3m %s ; nametemplate=%s.html ; copiousoutput ; test=which w3m >/dev/null 2>&1 text/html; false ; print=w3m -dump -cols 132 -T text/html file://%s | mpage -bLetter -1 -P -M132 text/html; false ; edit=vim '+set ft=html' %s ; needsterminal text/html; false ; compose=vim '+set ft=html' %s ; needsterminal application/msword; dumptext antiword %s ; copiousoutput application/msword; false ; print=antiword -p letter %s | mpage -bLetter -2 -P application/pdf; env LC_ALL=C acroread %s ; nametemplate=%s.pdf ; test=test -n "$DISPLAY" && which acroread >/dev/null 2>&1 application/pdf; env LC_ALL=C evince %s ; nametemplate=%s.pdf ; test=test -n "$DISPLAY" && which evince >/dev/null 2>&1 application/pdf; env LC_ALL=C xpdf %s ; nametemplate=%s.pdf ; test=test -n "$DISPLAY" && which xpdf >/dev/null 2>&1 application/pdf; ps2ascii %s ; copiousoutput ; nametemplate=%s.pdf application/postscript; ggv %s ; nametemplate=%s.ps ; test=test -n "$DISPLAY" && which ggv >/dev/null 2>&1 application/postscript; ps2ascii %s ; copiousoutput ; nametemplate=%s.ps application/postscript; false ; print=mpage -bLetter -2 -P image/*; gqview %s ; test=test -n "$DISPLAY" && which gqview >/dev/null 2>&1 image/*; eog %s ; test=test -n "$DISPLAY" && which eog >/dev/null 2>&1 image/*; display %s ; test=test -n "$DISPLAY" && which display >/dev/null 2>&1 image/*; xv %s ; test=test -n "$DISPLAY" && which xv >/dev/null 2>&1 # Try to recognize code; this could be extended text/x-csrc; view '+set ft=c' %s ; needsterminal text/x-csrc; cat ; copiousoutput text/x-csrc; false ; edit=vim '+set ft=c' %s ; needsterminal text/x-csrc; false ; compose=vim '+set ft=c' %s ; needsterminal text/x-csrc; false ; print=a2ps -1 -Ec -g --chars-per-line=132 --borders=no # Diffs and patches text/x-diff; cat %s ; copiousoutput text/x-diff; false ; edit=vim '+set ft=patch' %s ; needsterminal text/x-patch; cat %s ; copiousoutput text/x-patch; false ; edit=vim '+set ft=patch' %s ; needsterminal # rpms application/x-redhat-package-manager; rpm -K %s && echo && rpm -qpi %s && echo && rpm -qpl %s; copiousoutput # Text fall-back text/*; cat %s ; copiousoutput text/*; false ; edit=vim %s ; needsterminal text/*; false ; compose=vim %s ; needsterminal text/*; false ; print=a2ps -1 --borders=no message/partial; showpartial %s %{id} %{number} %{total} | less ; needsterminal message/partial; showpartial %s %{id} %{number} %{total} ; copiousoutput application/zip; unzip -l %s ; copiousoutput # vim:set nowrap tw=80: