In my last post about an alias that opened a URL from the command line, I said:
open is OS X specific. On Linux you’d want xdg-open or gnome-open, on Windows, start, under Cygwin, cygstart.
Launchy automatically makes the decision I outline above, providing both a Ruby API to open URLs and a command line wrapper, the latter being handy for aliases like mine.
To use, install launchy:
or, if you’re going to use it in code, add:
to your Gemfile and
bundle install. Once installed it’s as simple
Launchy turns up any number of places, for example the
save_and_open_page functionality of
With Launchy installed, you can modify my original aliases thusly:
giving you a simple, cross platform alias.