You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
812 B
32 lines
812 B
10 years ago
|
Pry.config.editor = 'vim'
|
||
|
|
||
|
Pry.prompt = [
|
||
|
proc { |target, _, _| "(#{Pry.view_clip(target)})> " },
|
||
|
proc { |target, _, _| "(#{Pry.view_clip(target)})| " },
|
||
|
]
|
||
|
|
||
|
begin
|
||
10 years ago
|
require 'pry-byebug'
|
||
10 years ago
|
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
|
||
|
|
||
10 years ago
|
def pbcopy(str=nil)
|
||
|
str = yield if block_given?
|
||
10 years ago
|
IO.popen(%w[pbcopy], 'w') {|io| io.write str }
|
||
10 years ago
|
end
|
||
|
|
||
|
def tic; @_tic = Time.now; end
|
||
|
def toc; Time.now - @_tic; end
|
||
|
|
||
10 years ago
|
Pry::Commands.command /^$/, "repeat last command" do
|
||
|
_pry_.input = StringIO.new(Pry.history.to_a.last)
|
||
|
end
|
||
|
|
||
10 years ago
|
pryrc_local = File.expand_path('../.pryrc.local', __FILE__)
|
||
|
load pryrc_local if File.exists?(pryrc_local)
|