-
Notifications
You must be signed in to change notification settings - Fork 0
/
.irbrc
34 lines (28 loc) · 657 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
29
30
31
32
33
34
require 'irb/completion'
IRB.conf[:AUTO_INDENT]=true
# Save History between irb sessions
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = ".irb-save-history"
# Load the readline module.
IRB.conf[:USE_READLINE] = true
# Remove the annoying irb(main):001:0 and replace with >>
IRB.conf[:PROMPT_MODE] = :SIMPLE
# Clear the screen
def clear!
system 'clear'
if ENV['RAILS_ENV']
return "Rails environment: " + ENV['RAILS_ENV']
end
end
if defined?(::Rails)
require "logger"
Rails.logger = Logger.new(STDOUT)
def c!
clear!
"Rails environment: " + ::Rails.env
end
def r!
reload!
end
end