Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

irb keeps saving history, even though turned off via IRB configuration

Tags:

ruby

jruby

I have in my .irbrc the statements

IRB.conf[:SAVE_HISTORY] = nil
IRB.conf[:EVAL_HISTORY] = nil

but irb still creates a history file. Do I need to set something else?

UPDATE: On request, this is the effective command used to run irb (pathes shortened):

export IRBRC=/path/to/irbrc_for_testing.rb
java -Xmx4G -cp /path/to/org/jruby/jruby-complete/1.7.27/jruby-complete-1.7.27.jar org.jruby.Main /path/to/bin/jirb_swing_ex

The files jruby-complete-1.7.27.jar and jirb_swing_ex were downloaded from the JRuby web site.

The file irbrc_for_testing.rb contains the IRB.conf settings.

like image 599
user1934428 Avatar asked Oct 20 '25 06:10

user1934428


1 Answers

By default, irb will store the last 1000 commands you used in IRB.conf[:HISTORY_FILE] (~/.irb_history by default).

If you want to disable the history feature, add IRB.conf[:SAVE_HISTORY] = nil to your .irbrc file and run the irb command in the same directory where your .irbrc file is located.

like image 132
kak Avatar answered Oct 21 '25 20:10

kak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!