https://github.com/cldwalker/ripl-color_error
ripl plugin to colorize errors
https://github.com/cldwalker/ripl-color_error
Last synced: about 1 year ago
JSON representation
ripl plugin to colorize errors
- Host: GitHub
- URL: https://github.com/cldwalker/ripl-color_error
- Owner: cldwalker
- License: mit
- Created: 2010-11-09T07:16:16.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-11-16T13:28:52.000Z (over 15 years ago)
- Last Synced: 2025-04-06T18:53:03.226Z (about 1 year ago)
- Language: Ruby
- Size: 97.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- Changelog: CHANGELOG.rdoc
- License: LICENSE.txt
Awesome Lists containing this 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}[http://en.wikipedia.org/wiki/ANSI_escape_code]. With
the correct code you can bold, underline, add a background color ...