Skip to content

Instantly share code, notes, and snippets.

@javier
Created June 10, 2009 11:27
Show Gist options
  • Save javier/127156 to your computer and use it in GitHub Desktop.
Save javier/127156 to your computer and use it in GitHub Desktop.
require 'irb/completion'
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
begin
# load wirble
require "rubygems"
require 'wirble'
# start wirble (with color)
Wirble.init :skip_prompt=>true
Wirble.colorize
rescue LoadError => err
warn "Couldn't load Wirble: #{err}"
end
IRB.conf[:PROMPT][:DEFAULT][:PROMPT_C]=Wirble::Colorize.colorize_string(IRB.conf[:PROMPT][:DEFAULT][:PROMPT_C], :light_blue)
IRB.conf[:PROMPT][:DEFAULT][:PROMPT_I]=Wirble::Colorize.colorize_string(IRB.conf[:PROMPT][:DEFAULT][:PROMPT_I], :blue)
IRB.conf[:PROMPT][:DEFAULT][:PROMPT_S]=Wirble::Colorize.colorize_string(IRB.conf[:PROMPT][:DEFAULT][:PROMPT_S], :yellow)
IRB.conf[:PROMPT][:DEFAULT][:RETURN]=Wirble::Colorize.colorize_string(IRB.conf[:PROMPT][:DEFAULT][:RETURN], :brown)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment