Skip to content

Instantly share code, notes, and snippets.

@tncbbthositg
Last active August 29, 2015 14:16
Show Gist options
  • Save tncbbthositg/0ef82da7b9a0fe4d0708 to your computer and use it in GitHub Desktop.
Save tncbbthositg/0ef82da7b9a0fe4d0708 to your computer and use it in GitHub Desktop.
Configuring Pry
# see .irbrc here: https://gist.github.com/tncbbthositg/96bfaf644172595960eb
current_directory = File.dirname __FILE__
file = File.join current_directory, ".irbrc"
load file
Pry.config.commands.command 'pbcopy', 'Copy value to clipboard' do |input|
pbcopy input.to_s
end
Pry.config.commands.command 'pbpaste', 'Paste value from clipboard' do
puts `pbpaste`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment