Skip to content

Instantly share code, notes, and snippets.

@dariodaich
Created April 27, 2016 15:17
Show Gist options
  • Save dariodaich/a563759cf33bfec876fa0275443b70b9 to your computer and use it in GitHub Desktop.
Save dariodaich/a563759cf33bfec876fa0275443b70b9 to your computer and use it in GitHub Desktop.
Pry quasi-blitz talk

Pry plugins:

.pryrc

Pry.config.should_load_rc      = true
Pry.config.should_load_plugins = true
Pry.config.auto_indent         = true
Pry.config.prompt_name         = File.basename(Dir.pwd)
Pry.config.theme  = 'zenburn'
Pry.config.editor = 'vim'
Pry.config.color  = 'true'
Pry.config.prompt_name = File.basename(Dir.pwd)
Pry.config.prompt = [
  proc do |obj, nest_level, pry|
    "\033[0;34m(#{pry.input_array.size})-(#{Pry.config.prompt_name})-(#{obj})-(#{nest_level})-: \033[0;33m"
    end,
  proc do |obj, nest_level, pry|
    "\033[0;34m(#{pry.input_array.size})-(#{Pry.config.prompt_name})-(#{obj})-(#{nest_level}).. \033[0;33m"
  end
]

gem-open patch:

file: pry-0.10.3/lib/pry/commands/gem_open.rb

Edit L19 from this..

Pry::Editor.invoke_editor(".", 0, false)

..to this..

Pry::Editor.new(_pry_).invoke_editor(".", 0, false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment