No commit activity in last 3 years
No release in over 3 years
This ripl plugin allows you to color errors in the console.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.2.0
 Project Readme

Description¶ ↑

This ripl plugin allows you to color errors in the console.

Install¶ ↑

Install the gem with:

sudo gem install ripl-color_error

Usage¶ ↑

Add to your ~/.riplrc

require 'ripl/color_error'

By default this plugin uses red. But say you want to configure it to blue:

# after the above require
Ripl.config[:color_error] = :blue

While in the console you can change colors as desired:

$ ripl
>> Ripl.config[:color_error] = :blue
=> :blue

# To turn off coloring
>> Ripl.config[:color_error] = false

# If you know your ansi escape codes
>> Ripl.config[:color_error] = '34;1'
=> '34;1'

# See available predefined colors
>> Ripl::ColorError::COLORS

To explore ansi escape codes, see here. With the correct code you can bold, underline, add a background color …