How to Open Links in a Non-Default Browser from TTYtter Running on Mac OS X

Yesterday I blogged about opening links from TTYtter for PERL in Lynx while running the app over SSH. This morning I decided to just run the app locally on my work computer. Due to IT restrictions, I don't have access to .profile, so I just downloaded the text file to a local directory, changed the name of the file to twitter, made it executable by typing chmod +x twitter, and went through the OAuth process. Now while in that directory I can just type ./twitter to run the app.

A benefit of running the app on my local machine is that I can open URLs in a GUI web browser. The developer suggests that MAC OS X users can /set the urlopen parameter to open %U. For work reasons, my default browser is not the browser I use for personal browsing, so I went into the text file, and changed

$urlopen ||= 'echo %U';

to

$urlopen ||= 'open -a "Google Chrome" %U';

Now I can just type /url followed by the thread ID, and the first link in the tweet will open in Chrome.