Skip to content

Instantly share code, notes, and snippets.

@ingeniarius
Created May 21, 2013 12:05
Show Gist options
  • Save ingeniarius/5619331 to your computer and use it in GitHub Desktop.
Save ingeniarius/5619331 to your computer and use it in GitHub Desktop.
Pry.prompt = [Proc.new{ |obj, nest_level| "#{RUBY_VERSION}-#{RUBY_PATCHLEVEL} (#{obj}):#{nest_level} > " },
Proc.new{ |obj, nest_level| "#{RUBY_VERSION} (#{obj}):#{nest_level} * " } ]
cmd_aliases = {
'continue' => 'c',
'step' => 's',
'next' => 'n'
}
cmd_aliases.each do |_cmd, _alias|
Pry.commands.alias_command _alias, _cmd if Pry.commands[_cmd]
end
require 'hirb'
Hirb.enable
Pry.config.print = Proc.new do |output, value|
Hirb::View.view_or_page_output(value) || Pry::DEFAULT_PRINT.call(output, value)
end
# fix for NoMethodError: undefined method `reload!' for main:Object
include Rails::ConsoleMethods if defined? Rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment