Skip to content

Commit

Permalink
gist: window's fix for broken clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
banister committed Jan 16, 2013
1 parent 6fdb393 commit 19aa778
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/pry/commands/gist.rb
Expand Up @@ -83,8 +83,14 @@ def gist_content(content, filename)
response = Jist.gist(content, :filename => filename || "pry_gist.rb", :public => !!opts[:p])
if response
url = response['html_url']
Jist.copy(url)
output.puts 'Gist created at URL, which is now in the clipboard: ', url
message = "Gist created at URL #{url}"
begin
Jist.copy(url)
message << ", which is now in the clipboard."
rescue Jist::ClipboardError
end

output.puts message
end
end
end
Expand Down

0 comments on commit 19aa778

Please sign in to comment.