.irbrc location/path

N

Narayanan K

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

Hi all,

I want to place *.irbrc* config file in a folder in */tmp* or any other
folder other than under /home and point my *$IRBRC* environment variable to
this location.
*Is this possible??*

From the init.rb file, I found the following code snippet:

# enumerate possible rc-file base name generators
def IRB.rc_file_generators
if irbrc = ENV["IRBRC"]
yield proc{|rc| rc == "rc" ? irbrc : irbrc+rc}
end
if home = ENV["HOME"]
yield proc{|rc| home+"/.irb#{rc}"}
end
home = Dir.pwd
yield proc{|rc| home+"/.irb#{rc}"}
yield proc{|rc| home+"/irb#{rc.sub(/\A_?/, '.')}"}
yield proc{|rc| home+"/_irb#{rc}"}
*yield proc{|rc| home+"/$irb#{rc}"}*
end

Could somebody please help me understand the above method? Can .irbrc be
stored in folders other than home, like in /tmp or in /root etc..?

Thanks in advance,

Regards,
Narayanan
 

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

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top