Created
May 18, 2011 09:55
-
-
Save kewinwang/978306 to your computer and use it in GitHub Desktop.
custom configuration ~/.irbrc file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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