-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pryrc
42 lines (38 loc) · 963 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
31
32
33
34
35
36
37
38
39
40
41
42
begin
require 'awesome_print'
Pry.config.print = proc { |output, value| output.puts value.ai }
rescue LoadError
puts 'no awesome_print :('
end
begin
require 'hirb'
rescue LoadError
puts 'no hirb :('
end
# if defined? Hirb
# Hirb::View.instance_eval do
# def enable_output_method
# @output_method = true
# @old_print = Pry.config.print
# Pry.config.print = proc do |*args|
# Hirb::View.view_or_page_output(args[1]) || @old_print.call(*args)
# end
# end
#
# def disable_output_method
# Pry.config.print = @old_print
# @output_method = nil
# end
# end
#
# Hirb.enable
# end
Pry.config.prompt = proc do |obj, _nest_level, _pry_|
"#{Pry.config.prompt_name}(#{Pry.view_clip(obj)})> "
end
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'
end