-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pryrc
33 lines (28 loc) · 794 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
# frozen_string_literal: true
begin
require 'rails/console/app'
extend Rails::ConsoleMethods
rescue LoadError
end
begin
require 'active_support/testing/time_helpers'
include ActiveSupport::Testing::TimeHelpers
rescue LoadError
end
# Pry.config.correct_indent = false
# Pry.config.auto_indent = false
begin
if defined?(PryDebugger) || 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.alias_command 'wai', 'whereami'
Pry.commands.alias_command 'dp', 'disable-pry'
end
rescue LoadError => e
puts e
end
Pry::Commands.command(/^$/, 'repeat last command') do
pry_instance.run_command Pry.history.to_a.last
end