mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
gist: window's fix for broken clipboard
This commit is contained in:
parent
6fdb393605
commit
19aa778526
1 changed files with 8 additions and 2 deletions
|
@ -83,8 +83,14 @@ class Pry
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue