forked from thoughtbot/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpryrc
24 lines (21 loc) · 813 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
# use fzf in pry
# require 'rb-readline'
# def RbReadline.rl_reverse_search_history(sign, key)
# rl_insert_text `cat ~/.pry_history | fzf --tac | tr '\n' ' '`
# end
Pry.config.editor = "vim"
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.alias_command 'c', 'continue' rescue nil
Pry.commands.alias_command 's', 'step' rescue nil
Pry.commands.alias_command 'n', 'next' rescue nil
Pry.commands.alias_command 'f', 'finish' rescue nil
Pry.commands.alias_command 'l', 'whereami' rescue nil
end
# Hit Enter to repeat last command
Pry::Commands.command /^$/, "repeat last command" do
pry_instance.run_command Pry.history.to_a.last
end