Skip to content

Instantly share code, notes, and snippets.

@collin
Created December 9, 2008 00:17
Show Gist options
  • Select an option

  • Save collin/33696 to your computer and use it in GitHub Desktop.

Select an option

Save collin/33696 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'irb/completion'
require 'irb/ext/save-history'
require 'pp'
require 'pathname'
__DIR__ = Pathname.new(__FILE__).dirname.expand_path
eval (__DIR__+".irbrc").read if (__DIR__+".irbrc").exist?
require 'wirble'
Wirble.init
Wirble.colorize
Wirble::Colorize.colors = {
:colon=>:red,
:comma=>:blue,
:object_line_prefix=>:blue,
:open_hash=>:green,
:object_class=>:blue,
:refers=>:blue,
:class=>:blue,
:open_array=>:green,
:symbol_prefix=>:red,
:close_array=>:green,
:string=>:cyan,
:range=>:red,
:open_string=>:red,
:close_hash=>:green,
:close_object=>:black,
:symbol=>:red,
:close_string=>:red,
:keyword=>:green,
:object_addr_prefix=>:blue,
:open_object=>:black,
:number=>:cyan}
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
def ls(l=false)
system("ls #{l ? '-l' : nil}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment