Browse files

Merge pull request #44 from alistra/patch-1

Opening gists in a browser on Linux
  • Loading branch information...
2 parents 0ec104a + 804ebbb commit 3a6aa20cdb21ab20906fd85fc91c28c9da252b8c Andre Arko committed May 11, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/gist.rb
View
2 lib/gist.rb
@@ -151,6 +151,8 @@ def read(gist_id)
def browse(url)
if RUBY_PLATFORM =~ /darwin/
`open #{url}`
+ elsif RUBY_PLATFORM =~ /linux/
+ `#{ENV['BROWSER']} #{url}`
elsif ENV['OS'] == 'Windows_NT' or
RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw|wince/i
`start "" "#{url}"`

0 comments on commit 3a6aa20

Please sign in to comment.