-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pryrc
26 lines (24 loc) · 1.19 KB
/
.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
# Stolen from @zph - https://github.com/zph/zph
Pry.commands.alias_command 'x', 'exit'
Pry.commands.alias_command 'wh', 'whereami'
Pry.commands.alias_command 'pl', 'play -l'
Pry.commands.alias_command 'ht', 'hist -T'
Pry.commands.alias_command 'hr', 'hist -r'
Pry.config.editor = proc { |file, line| "emacs +#{line} #{file}"}
# == Pry-Nav - Using pry as a debugger ==
Pry.commands.alias_command 'c', 'continue' rescue nil
Pry.commands.alias_command 's', 'step' rescue nil
Pry.commands.alias_command 'n', 'next' rescue nil
# === CUSTOM PROMPT ===
# This prompt shows the ruby version (useful for RVM)
Pry.prompt = [proc { |obj, nest_level, _| "#{RUBY_VERSION} (#{obj}):#{nest_level} > " }, proc { |obj, nest_level, _| "#{RUBY_VERSION} (#{obj}):#{nest_level} * " }]
# === Listing config ===
# Better colors - by default the headings for methods are too
# similar to method name colors leading to a "soup"
# These colors are optimized for use with Solarized scheme
# for your terminal
Pry.config.ls.separator = "\n" # new lines between methods
Pry.config.ls.heading_color = :magenta
Pry.config.ls.public_method_color = :green
Pry.config.ls.protected_method_color = :yellow
Pry.config.ls.private_method_color = :bright_black