gist: 2612 Download_button fork
public
Public Clone URL: git://gist.github.com/2612.git
.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
68
69
begin
  require 'rubygems'
  require 'readline/history/restore/auto_save'
  Readline::History::Restore::AutoSave.scriptname
  #require 'active_support'
rescue Exception
end
 
module Kernel
  def r(arg)
    puts `refe #{arg}`
  end
  private :r
end
 
class Module
  def r(meth = nil)
    if meth
      if instance_methods(false).include? meth.to_s
        puts `refe #{self}##{meth}`
      else
        super
      end
    else
      puts `refe #{self}`
    end
  end
end
 
#module Kernel
# def lg(*args)
# Gem::IrbCompletion.get_instance.gem *args
# end
#end
#
#module Gem
# class IrbCompletion
# def initialize
# puts 'new!'
# IrbCompletion.instance_methods.each do |m|
# next if %w|__send__ __id__ object_id gem|.include? m.to_s
# IrbCompletion.module_eval { undef_method m }
# end
#
# Gem.source_index.to_a.map{|a| a.last.name}.each do |name|
# IrbCompletion.module_eval {
# define_method(name, IrbCompletion.instance_method(:gem))
# }
# end
# end
#
# def gem(gem_name, *version_requirements)
# puts '!!'
# end
# def self.get_instance
# @@instance ||= self.new
# end
# end
#end
 
 
 
IRB.conf[:PROMPT_MODE] = :SIMPLE
require 'irb/completion'
#require 'irb-history'
IRB.conf[:AUTO_INDENT] = true
##IRB.conf[:SAVE_HISTORY] = 100000
 
IRB.conf[:EVAL_HISTORY] = 16

Owner

hotchpotch

Revisions