Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'f', 'finish'
Pry.commands.alias_command 'e', 'edit'
Pry.commands.alias_command 'mi', 'edit'
Pry.commands.alias_command 'mine', 'edit'
Pry.commands.alias_command 'ss', 'show-stack'
Pry.commands.alias_command 'code', 'show-source'
Pry::Commands.command /^$/, "repeat last command" do
command = Pry.history.to_a.last
_pry_.run_command(command) unless command == "exit"
end
Pry.config.editor = proc { |file, line| "/usr/local/bin/mine --line #{line} #{file}" }
Pry.config.pager = true
Pry.config.prompt = proc do |obj, nest_level, _pry_|
prompt = ""
prompt << "#{Pry.config.prompt_name.to_s.blue}"
prompt << "(#{Pry.view_clip(obj).to_s.cyan})"
prompt << "[#{RUBY_VERSION.to_s.green}]"
prompt << "> "
end
def caller_products
caller.reject {|l| l.include?( 'gems' )}
end
def caller_gems
caller.select {|l| l.include?( 'gems' )}
end
class String
def red; "\e[31m#{self}\e[0m"; end
def green; "\e[32m#{self}\e[0m"; end
def yellow; "\e[33m#{self}\e[0m"; end
def blue; "\e[34m#{self}\e[0m"; end
def magenta;"\e[35m#{self}\e[0m"; end
def cyan; "\e[36m#{self}\e[0m"; end
def bold; "\e[1m#{self}\e[0m"; end
def back_blue; "\e[44m#{self}\e[0m"; end
end