public
Description: my dotfiles
Clone URL: git://github.com/kesor/dotfiles.git
add some rails specific settings to irbrc, for a better console
kesor (author)
Mon Jul 07 09:12:47 -0700 2008
commit  ac37b3003bb5c6c47d84160b45a61753d20525c0
tree    ef05380a02dd51cec7f39e2201f641cab97fee17
parent  1aff336bda14c93b406afc69bd16de421fbfc2d9
0
...
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
0
@@ -1 +1,22 @@
0
 require 'rubygems'
0
+require 'pp'
0
+require 'irb/completion'
0
+ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
0
+IRB.conf[:AUTO_INDENT]=true
0
+
0
+# load console_with_helpers if possible
0
+script_console_running = ENV.include?('RAILS_ENV') && IRB.conf[:LOAD_MODULES] && IRB.conf[:LOAD_MODULES].include?('console_with_helpers')
0
+rails_running = ENV.include?('RAILS_ENV') && !(IRB.conf[:LOAD_MODULES] && IRB.conf[:LOAD_MODULES].include?('console_with_helpers'))
0
+irb_standalone_running = !script_console_running && !rails_running
0
+
0
+# log Rails stuff to STDOUT
0
+if script_console_running
0
+ require 'logger'
0
+ Object.const_set(:RAILS_DEFAULT_LOGGER, Logger.new(STDOUT))
0
+end
0
+
0
+# Keep command-line history between startups
0
+require 'irb/ext/save-history'
0
+IRB.conf[:SAVE_HISTORY] = 100
0
+IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
0
+

Comments

    No one has commented yet.