-
Notifications
You must be signed in to change notification settings - Fork 3
/
.irbrc
68 lines (53 loc) · 1.53 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
require 'irb/completion'
require 'irb/ext/save-history'
require 'awesome_print'
require 'pry'
require 'pry-nav'
require 'luffa'
AwesomePrint.irb!
ARGV.concat [ '--readline',
'--prompt-mode',
'simple']
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = '.irb-history'
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:PROMPT][:LUFFA] = {
:PROMPT_I => "luffa #{Luffa::VERSION}> ",
:PROMPT_N => "luffa #{Luffa::VERSION}> ",
:PROMPT_S => nil,
:PROMPT_C => "> ",
:AUTO_INDENT => true,
:RETURN => "%s\n"
}
IRB.conf[:PROMPT_MODE] = :LUFFA
begin
require 'pry'
Pry.config.history.should_save = false
Pry.config.history.should_load = false
require 'pry-nav'
rescue LoadError => _
end
puts ''
puts '# => Useful Methods <= #'
puts '> quiet => Turn off DEBUG logging.'
puts '> verbose => Turn on DEBUG logging.'
puts ''
def quiet
ENV.delete('DEBUG')
end
def verbose
ENV['DEBUG'] = '1'
end
module Luffa
module IRBRC
def self.message_of_the_day
motd=["Let's get this done!", 'Ready to rumble.', 'Enjoy.', 'Remember to breathe.',
'Take a deep breath.', "Isn't it time for a break?", 'Can I get you a coffee?',
'What is a calabash anyway?', 'Smile! You are on camera!', 'Let op! Wild Rooster!',
"Don't touch that button!", "I'm gonna take this to 11.", 'Console. Engaged.',
'Your wish is my command.', 'This console session was created just for you.']
puts "#{motd.shuffle().first}"
end
end
end
Luffa::IRBRC.message_of_the_day