Permalink
Browse files

This adds opening of the gist in the browser window in Linux using th…

…e BROWSER variable, defined in some Linux distributions.
  • Loading branch information...
1 parent 0ec104a commit 804ebbb0bcf231b1b4b59430ef8a997cff7f8fa3 @alistra alistra committed May 7, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/gist.rb
View
@@ -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 804ebbb

Please sign in to comment.