Skip to content

Commit

Permalink
Merge pull request defunkt#44 from alistra/patch-1
Browse files Browse the repository at this point in the history
Opening gists in a browser on Linux
  • Loading branch information
Andre Arko committed May 11, 2011
2 parents 0ec104a + 804ebbb commit 3a6aa20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/gist.rb
Expand Up @@ -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}"`
Expand Down

0 comments on commit 3a6aa20

Please sign in to comment.