-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pryrc
31 lines (25 loc) · 850 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
Pry.config.editor = 'vim'
Pry::Prompt.add :kejadlen, nil, %w[ > | ] do |_, _, _, sep|
"(#{Pry.view_clip(target)})#{sep} "
end
begin
require 'pry-byebug'
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 'u', 'finish' # up
Pry.commands.alias_command 'b', 'break'
rescue LoadError
end
def pbcopy(str=nil)
str = yield if block_given?
IO.popen(%w[pbcopy], 'w') {|io| io.write str }
end
def tic; @_tic = Time.now; end
def toc; Time.now - @_tic; end
def rot13(s=nil); s ||= `pbpaste`; s.tr("A-Za-z","N-ZA-Mn-za-m"); end
Pry::Commands.command /^$/, "repeat last command" do
_pry_.input = StringIO.new(Pry.history.to_a.last)
end
pryrc_local = File.expand_path('../.pryrc.local', __FILE__)
load pryrc_local if File.exist?(pryrc_local)