blob: 176ed746ade405e66ee4afa966eb333499f58c83 (
plain)
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
|
#!/usr/bin/env ruby
#
# Author: Miquel Sabaté
# http://github.com/mssola/dotfiles
require 'irb/completion'
require 'irb/ext/save-history'
require 'rubygems'
require 'pp'
require 'wirble'
# Colorize!
Wirble.init
Wirble.colorize
# Simple prompt
IRB.conf[:PROMPT_MODE] = :SIMPLE
# History
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = File.expand_path('~/.irb_history')
# Auto-indentation
IRB.conf[:AUTO_INDENT] = true
# Use readline
IRB.conf[:USE_READLINE] = true
# List object methods
def local_methods(obj = self)
(obj.methods - obj.class.superclass.instance_methods).sort
end
# Reload this .irbrc
def reload!
load __FILE__
end
# Beautify ls
def ls
%x{ls}.split("\n")
end
alias p pp
|