Created
June 5, 2014 21:38
-
-
Save phallguy/7ba6446584c67d5c1624 to your computer and use it in GitHub Desktop.
.pryrc for common aliases and shortcuts
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
# Save in ~/.pryrc | |
begin | |
require 'awesome_print' | |
rescue LoadError => err | |
puts "no awesome_print :(" | |
end | |
begin | |
if defined?(PryDebugger) | |
Pry.commands.alias_command 'c', 'continue' | |
Pry.commands.alias_command 's', 'step' | |
Pry.commands.alias_command 'n', 'next' | |
Pry.commands.alias_command 'f', 'finish' | |
Pry.commands.alias_command 'wai', 'whereami' | |
end | |
rescue LoadError => err | |
puts err | |
end | |
Pry::Commands.command /^$/, "repeat last command" do | |
_pry_.run_command Pry.history.to_a.last | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[1] pry(#)> c
NameError: undefined local variable or method
c' for #<Object:0x007ff5d3899010> from /Users/u491512/.rvm/gems/ruby-2.3.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers.rb:966:in
method_missing'[2] pry(#)> wai
NameError: undefined local variable or method
wai' for #<Object:0x007ff5d3899010> Did you mean? warn from /Users/u491512/.rvm/gems/ruby-2.3.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers.rb:966:in
method_missing'[3] pry(#)> f
NameError: undefined local variable or method
f' for #<Object:0x007ff5d3899010> from /Users/u491512/.rvm/gems/ruby-2.3.0/gems/rspec-expectations-3.4.0/lib/rspec/matchers.rb:966:in
method_missing'[4] pry(#)>