How to make that irb commands in the history?

I want to store the commands input in irb in the history and use them
next time. How should I do that? Thanks.

What system are you using?

Have you tried this: https://www.ruby-forum.com/topic/770991#971638

Vlad M_ wrote in post #1142518:

What system are you using?

Have you tried this: https://www.ruby-forum.com/topic/770991#971638

Thanks. I am using Linux Redhat and I can not find the file. How should
I deal with it?

Just create it in your home dir:

echo “IRB.conf[:SAVE_HISTORY] = 1000” > ~/.irbrc

.irbrc is loaded every time you start irb. It’s a plain ruby code, you
can put there anything you need for your irb session. Try searching on
the web for some examples how other people make use of .irbrc file, you
will certainly find interesting use cases.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs