Edit: The faded gray is only an issue with version 0.9.7.3 and before. It has since been changed to a darker gray.
Pry has nice colorizing, but the value returned when an object is created or changed is a faded gray that I can barely see.
u = User.new
=>#<User... <<<<<< This is what is barely readable.
I tried messing with values in .pryrc, but couldn't get this, or any other color for that matter, to change.
Pry uses CodeRay for coloring, so you can put the following in your .pryrc file:
CodeRay.scan("example", :ruby).term # just to load necessary files
TERM_TOKEN_COLORS = {
:symbol => '1;31' # will make symbols bolded and light red on my terminal
}
module CodeRay
module Encoders
class Term < Encoder
# override old colors
TERM_TOKEN_COLORS.each_pair do |key, value|
TOKEN_COLORS[key] = value
end
end
end
end
You can see here all values that can be customized (not sure which one exactly is the one you mentioned, but shouldn't be hard to track down): https://github.com/rubychan/coderay/blob/master/lib/coderay/encoders/terminal.rb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With