-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pryrc
29 lines (25 loc) · 848 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
## ~/.pryrc
## pry Personal Preference File @tearoom6
## Appearance
# Prompt
Pry.config.prompt_name = "ruby"
Pry.config.prompt = [
proc { |obj, nest_level, _| "#{Pry.config.prompt_name} #{RUBY_VERSION} (#{obj}):#{nest_level} > " },
proc { |obj, nest_level, _| "#{Pry.config.prompt_name} #{RUBY_VERSION} (#{obj}):#{nest_level} * " },
]
## Shortcuts
# Hit Enter to repeat last command
Pry::Commands.command /^$/, "repeat last command" do
last_command = Pry.history.to_a.last
if last_command != 'exit' && last_command != 'quit'
_pry_.run_command last_command
end
end
## Plugins
# pry-byebug
if defined?(PryByebug) || defined?(PryDebugger) || defined?(PryNav)
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