Last active
January 28, 2019 13:41
-
-
Save CraigMorton/315d0f206e1414804e639cde731dba24 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
echo "Installing and configuring Awesome Print for IRB" | |
gem install 'awesome_print' | |
cat >> "$HOME/.irbrc" << EOM | |
require "awesome_print" | |
AwesomePrint.irb! | |
require 'irb/completion' | |
IRB.conf[:AUTO_INDENT] = true | |
IRB.conf[:SAVE_HISTORY] = 1000 | |
IRB.conf[:PROMPT][:CUSTOM] = { | |
:PROMPT_I => 'irb> ', | |
:PROMPT_S => 'irb>%l ', | |
:PROMPT_C => 'irb>> ', | |
:PROMPT_N => 'irb>> ' | |
} | |
IRB.conf[:PROMPT_MODE] = :CUSTOM | |
EOM | |
cat >> "$HOME/.aprc" << EOM | |
AwesomePrint.defaults = { | |
index: false, | |
indent: 2, | |
sort_vars: false, | |
color: { | |
string: :cyanish, | |
symbol: :purple, | |
array: :white, | |
hash: :purpleish, | |
trueclass: :green, | |
falseclass: :red, | |
nilclass: :redish, | |
class: :yellow, | |
integer: :blue, | |
float: :blueish | |
} | |
} | |
EOM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment