-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pryrc
30 lines (26 loc) · 985 Bytes
/
.pryrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if defined?(PryByebug)
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.command /^$/, "repeat last command" do
_pry_.run_command Pry.history.to_a.last
end
end
if defined?(PryRails::RAILS_PROMPT)
Pry.config.prompt = PryRails::RAILS_PROMPT
end
if defined? AwesomePrint
AwesomePrint.pry!
## The following line enables awesome_print for all pry output,
# and enables paging using Pry's pager with awesome_print.
Pry.config.print = proc {|output, value| Pry::Helpers::BaseHelpers.stagger_output("=> #{value.ai(indent: 2)}", output)}
## If you want awesome_print without automatic pagination, use below:
# Pry.config.print = proc { |output, value| output.puts value.ai }
end
# Search method on Pry
# class Object
# def search_methods(qry)
# self.methods & self.methods.select { |m| m.to_s.include?(qry.to_s) }
# end
# end