Setting IRB Configurations using env variables?

N

Narayanan K

[Note: parts of this message were removed to make it a legal post.]

Hi,

Suppose I need to have IRB configurations before I invoke IRB like :

IRB.conf[:IGNORE_EOF]=true
IRB.conf[:VERBOSE]=false

This can be set in config files such as ~/.irbrc etc.. and saved before irb
is invoked.

But are there *environment variables I can set in shell to set those
configurations directly* before I invoke IRB..?
My idea is to *not* use a config file to customize my configurations, but to
use some irb env variables to set those before I invoke the irb.

Thanks in advance,

Narayanan
 
G

Gabriel Horner

Suppose I need to have IRB configurations before I invoke IRB like :
IRB.conf[:IGNORE_EOF]=true
IRB.conf[:VERBOSE]=false

This can be set in config files such as ~/.irbrc etc.. and saved before
irb
is invoked.

But are there *environment variables I can set in shell to set those
configurations directly* before I invoke IRB..?

You can't set those configurations with ENV variables. To verify
yourself, here's the file were irb intializes all of its configurations:
http://github.com/ruby/ruby/blob/trunk/lib/irb/init.rb. You'll notice
some configurations can be manipulated with commandline options to irb.
Otherwise you have to use .irbrc.

Gabriel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top