Skip to content

Commit 3a6aa20

Browse files
author
Andre Arko
committed
Merge pull request #44 from alistra/patch-1
Opening gists in a browser on Linux
2 parents 0ec104a + 804ebbb commit 3a6aa20

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/gist.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ def read(gist_id)
151151
def browse(url)
152152
if RUBY_PLATFORM =~ /darwin/
153153
`open #{url}`
154+
elsif RUBY_PLATFORM =~ /linux/
155+
`#{ENV['BROWSER']} #{url}`
154156
elsif ENV['OS'] == 'Windows_NT' or
155157
RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw|wince/i
156158
`start "" "#{url}"`

0 commit comments

Comments
 (0)