Skip to content

Instantly share code, notes, and snippets.

@kewinwang
Created May 18, 2011 09:55
Show Gist options
  • Save kewinwang/978306 to your computer and use it in GitHub Desktop.
Save kewinwang/978306 to your computer and use it in GitHub Desktop.
custom configuration ~/.irbrc file
require 'rubygems'
require 'wirble'
Wirble.init
Wirble.colorize
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')
require 'logger'
RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
end
IRB.conf[:IRB_RC] = proc do |conf|
leader = " " * conf.irb_name.length
conf.prompt_i = "#{conf.irb_name} =>"
conf.prompt_s = leader + ' \-"'
conf.prompt_c = leader + ' \-+'
conf.return_format = leader + " ==> %s\n"
puts "Welcome to kewin IRB console :)"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment