Created
June 5, 2009 12:55
-
-
Save bmaland/124272 to your computer and use it in GitHub Desktop.
This file contains 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
# Copy `n Paste from IRB, based on http://judofyr.net/posts/copy-paste-irb.html | |
# Requires xclip for clipboard interaction. Stick in .irbrc: | |
def copy(str) | |
IO.popen('xclip -i', 'w') { |f| f << str.to_s } | |
end | |
def paste | |
`xclip -o` | |
end | |
def ep | |
eval(paste) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment