-
-
Save xta/4490317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# switch default editor for pry to sublime text | |
Pry.config.editor = "sublime" | |
# format prompt to be <Rails version>@<ruby version>(<object>)> | |
Pry.config.prompt = proc do |obj, level, _| | |
prompt = "\e[1;30m" | |
prompt << "#{Rails.version} @ " if defined?(Rails) | |
prompt << "#{RUBY_VERSION}" | |
"#{prompt} (#{obj})>\e[0m" | |
end | |
# use awesome print for all objects in pry | |
begin | |
require 'awesome_print' | |
Pry.config.print = proc { |output, value| output.puts "=> #{ap value}" } | |
rescue | |
puts "=> Unable to load awesome_print, please type 'gem install awesome_print' or 'sudo gem install awesome_print'." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment