-
Notifications
You must be signed in to change notification settings - Fork 0
/
.irbrc
38 lines (33 loc) · 1.12 KB
/
.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
29
30
31
32
33
34
35
36
37
38
require 'irb/completion'
require 'irb/ext/save-history'
require 'open-uri'
require 'json'
require 'cgi'
ANSI_YELLOW = "\e[33m"
ANSI_PURPLE = "\033[35m"
ANSI_RESET = "\033[0m"
ANSI_BOLD = "\e[1m"
begin
require 'wirble'
Wirble.init
Wirble.colorize
rescue LoadError => err
warn "Couldn't load Wirble: #{err}"
end
unless IRB.conf[:LOAD_MODULES].include?('irb/completion')
IRB.conf[:LOAD_MODULES] << 'irb/completion'
end
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[:USE_READLINE] = true
IRB.conf[:LOAD_MODULES] = [] unless IRB.conf.key?(:LOAD_MODULES)
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