Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for copying and opening list items under Cygwin #108

Merged
merged 1 commit into from
Jul 11, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/boom/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
module Boom
class Platform
class << self
# Public: tests if currently running on cygwin.
#
# Returns true if running on Cygwin, else false
def cygwin?
!!(RbConfig::CONFIG['host_os'] =~ /cygwin/)
end

# Public: tests if currently running on darwin.
#
# Returns true if running on darwin (MacOS X), else false
Expand Down Expand Up @@ -37,6 +44,8 @@ def open_command
'open'
elsif windows?
'start'
elsif cygwin?
'cygstart'
else
'xdg-open'
end
Expand All @@ -63,7 +72,7 @@ def open(item)
def copy_command
if darwin?
'pbcopy'
elsif windows?
elsif windows? || cygwin?
'clip'
else
'xclip -selection clipboard'
Expand Down