Created
March 2, 2015 17:08
-
-
Save tncbbthositg/96bfaf644172595960eb to your computer and use it in GitHub Desktop.
pbcopy support for irb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pbcopy input | |
input.to_s.tap do |value| | |
IO.popen('pbcopy', 'w') { |clipboard| clipboard << value } | |
end | |
end | |
def pbpaste | |
puts `pbpaste` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment