Skip to content

Commit

Permalink
cleanup irbrc
Browse files Browse the repository at this point in the history
- remove gems that no longer work
- remove old Rails stuff
- add interactive_editor
  • Loading branch information
pitr committed Oct 15, 2012
1 parent 80a4aba commit 3c73823
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions irbrc
@@ -1,24 +1,16 @@
# print SQL to STDOUT
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')
require 'logger'
RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
end

# Autocomplete # Autocomplete
require 'irb/completion' require 'irb/completion'


IRB.conf[:PROMPT_MODE] = :SIMPLE IRB.conf[:PROMPT_MODE] = :SIMPLE


%w[rubygems looksee wirble].each do |g| %w[rubygems interactive_editor].each do |g|
begin begin
require g require g
rescue LoadError rescue LoadError
warn "- Might want to gem install #{g}" warn "- Might want to gem install #{g}"
end end
end end


Looksee.editor = "mate -l%l %f" if defined? Looksee

# Prompt behavior # Prompt behavior
ARGV.concat [ "--readline", "--prompt-mode", "simple" ] ARGV.concat [ "--readline", "--prompt-mode", "simple" ]


Expand All @@ -32,7 +24,7 @@ class Object
def local_methods(obj = self) def local_methods(obj = self)
(obj.methods - obj.class.superclass.instance_methods).sort (obj.methods - obj.class.superclass.instance_methods).sort
end end

# print documentation # print documentation
# #
# ri 'Array#pop' # ri 'Array#pop'
Expand Down

0 comments on commit 3c73823

Please sign in to comment.