forked from kimjoar/dotfiles
/
irbrc
28 lines (24 loc) · 884 Bytes
/
irbrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'irb/completion'
require 'irb/ext/save-history'
require 'open-uri'
require 'json'
require 'cgi'
require 'rubygems' unless defined? Gem
require 'wirb'
Wirb.start
ANSI_YELLOW = "\e[33m"
ANSI_PURPLE = "\033[35m"
ANSI_RESET = "\033[0m"
ANSI_BOLD = "\e[1m"
ARGV.concat [ "--readline", "--prompt-mode" ]
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history"
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:PROMPT][:CLOUD] = {
:PROMPT_I => "#{ANSI_PURPLE}%N>#{ANSI_RESET}\n ", # normal prompt
:PROMPT_S => "#{ANSI_PURPLE}%N%l#{ANSI_RESET}\n ", # prompt for continuing strings
:PROMPT_C => "#{ANSI_PURPLE}%N*#{ANSI_RESET}\n ", # prompt for continuing statement
:PROMPT_N => "#{ANSI_PURPLE}%N*#{ANSI_RESET}\n ", # "
:RETURN => "#{ANSI_PURPLE}=>#{ANSI_RESET}#{ANSI_YELLOW} %s#{ANSI_RESET}\n"
}
IRB.conf[:PROMPT_MODE] = :SIMPLE