Get mutt to open URLs in Safari

May 10, '04 10:01:00AM

Contributed by: chienr

If you're a mutt user (a very popular terminal-based email application) and you would like to open URLs from your emails in Safari as opposed to viewing them with lynx or elinks (neither is bundled with OS X), here's what you can do:

  1. Get urlview either from source or fink if you don't already have it

  2. Add this to your .muttrc:
    macro index cb |urlviewn 'call urlview to extract URLs out of a message'
    macro pager cb |urlviewn 'call urlview to extract URLs out of a message'
    
  3. Create $HOME/.urlview and put this line in there:
    COMMAND open %s
    
  4. Re-launch mutt or source .muttrc; use Ctrl-b to list your URLs; press enter to select/open it in Safari (or your default web browser)
Note: you don't need url_handler.sh like the doc says.

Comments (1)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040505224442133