-
Notifications
You must be signed in to change notification settings - Fork 2
/
.irbrc
34 lines (33 loc) · 1.13 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
# frozen_string_literal: true
autoload :Base64, 'base64'
autoload :CGI, 'cgi'
autoload :CSV, 'csv'
autoload :Digest, 'digest'
autoload :ERB, 'erb'
autoload :FileUtils, 'fileutils'
autoload :JSON, 'json'
autoload :Pathname, 'pathname'
autoload :Psych, 'psych'
autoload :Ripper, 'ripper'
autoload :SecureRandom, 'securerandom'
autoload :Shellwords, 'shellwords'
autoload :StringIO, 'stringio'
autoload :URI, 'uri/generic' # `autoload :URI, 'uri'` breaks Rails
autoload :YAML, 'yaml'
autoload :Zlib, 'zlib'
IRB.conf[:USE_AUTOCOMPLETE] = false
IRB.conf[:SAVE_HISTORY] = 1000
if defined?(IRB::Color) # just for consistency
clear = "\e[0m"
bold = "\e[1m"
green = "\e[32m"
blue = "\e[34m"
cyan = "\e[36m"
IRB.conf[:PROMPT][:DEFAULT] = {
PROMPT_I: "#{cyan}#{bold}%N#{clear}(#{green}#{bold}%m#{clear})[#{blue}%02n#{clear}:%i]> ",
PROMPT_N: "#{cyan}#{bold}%N#{clear}(#{green}#{bold}%m#{clear})[#{blue}%02n#{clear}:%i]> ",
PROMPT_S: "#{cyan}#{bold}%N#{clear}(#{green}#{bold}%m#{clear})[#{blue}%02n#{clear}:%i]%l ",
PROMPT_C: "#{cyan}#{bold}%N#{clear}(#{green}#{bold}%m#{clear})[#{blue}%02n#{clear}:%i]* ",
RETURN: "=> %s\n",
}
end