Skip to content

Instantly share code, notes, and snippets.

@caffo
Forked from anonymous/gist:7776906
Created December 3, 2013 20:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save caffo/7776924 to your computer and use it in GitHub Desktop.
# ~./mailcap
#
# this uses the view_attachment script found in ~/.bin/view_attachment.sh
#
# this is meant for an OS X system
# MS Excel
# this will use the default xls spreadsheet handler from open
application/x-msexcel; ~/.bin/view_attachment.sh %s
application/ms-exc; ~/.bin/view_attachment.sh %s
application/excel; ~/.bin/view_attachment.sh %s
application/msexcel; ~/.bin/view_attachment.sh %s
application/vnd.ms-exc; ~/.bin/view_attachment.sh %s
application/vnd.ms-excel; ~/.bin/view_attachment.sh %s
# MS Word
# use textedit to open .doc files as it's more light-weight
application/msword; ~/.bin/view_attachment.sh %s "-" '/Applications/TextEdit.app'
# Images
image/jpeg; ~/.bin/view_attachment.sh %s jpg
image/pjpeg; ~/.bin/view_attachment.sh %s jpg
image/png; ~/.bin/view_attachment.sh %s png
image/gif; ~/.bin/view_attachment.sh %s gif
# PDF
application/pdf; ~/.bin/view_attachment.sh %s pdf
# HTML
text/html; ~/.bin/view_attachment.sh %s html; needsterminal; copiousoutput;
# Unidentified.
application/octet-stream; ~/.bin/view_attachment.sh %s "-"
x-content/win32-software; "/Users/Rodrigo/Library/Application Support/CrossOver/desktopdata/CrossOver-0/cxassoc/Scripts/CrossOver-0:application_x-crossover-exe::install" '%s'; \
description="CrossOver (Install)"; \
test=test -n "$DISPLAY"
application/x-crossover-exe; "/Users/Rodrigo/Library/Application Support/CrossOver/desktopdata/CrossOver-0/cxassoc/Scripts/CrossOver-0:application_x-crossover-exe::install" '%s'; \
description="CrossOver (Install)"; \
test=test -n "$DISPLAY"
application/x-ms-shortcut; "/Users/Rodrigo/Library/Application Support/CrossOver/desktopdata/CrossOver-0/cxassoc/Scripts/CrossOver-0:application_x-crossover-lnk::run" '%s'; \
description="CrossOver (Run)"; \
test=test -n "$DISPLAY"
application/x-crossover-lnk; "/Users/Rodrigo/Library/Application Support/CrossOver/desktopdata/CrossOver-0/cxassoc/Scripts/CrossOver-0:application_x-crossover-lnk::run" '%s'; \
description="CrossOver (Run)"; \
test=test -n "$DISPLAY"
application/x-win-lnk; "/Users/Rodrigo/Library/Application Support/CrossOver/desktopdata/CrossOver-0/cxassoc/Scripts/CrossOver-0:application_x-crossover-lnk::run" '%s'; \
description="CrossOver (Run)"; \
test=test -n "$DISPLAY"
application/x-crossover-msi; "/Users/Rodrigo/Library/Application Support/CrossOver/desktopdata/CrossOver-0/cxassoc/Scripts/CrossOver-0:application_x-crossover-msi::install" '%s'; \
description="CrossOver (Install)"; \
test=test -n "$DISPLAY"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment