Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Setting IRB Configurations using env variables?

Reply
Thread Tools

Setting IRB Configurations using env variables?

 
 
Narayanan K
Guest
Posts: n/a
 
      06-17-2010
[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

 
Reply With Quote
 
 
 
 
Gabriel Horner
Guest
Posts: n/a
 
      06-18-2010
> 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
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting ASP.NET Configurations in a new Web Site in IIS 6 Alex Maghen ASP .Net 5 02-05-2008 06:15 AM
ENV['LD_LIBRARY_PATH'] not changing env TDR Ruby 3 08-31-2007 06:01 PM
SAXException: Attribute "xmlns:env" was already specified for element "env:Envelope' Ankit Mehta Java 1 09-29-2006 09:24 PM
irb question - variable definitions when calling irb from a script problem Nuralanur@aol.com Ruby 1 10-26-2005 09:13 PM
[ANN] irb-history 1.0.0: Persistent, shared Readline history for IRB Sam Stephenson Ruby 1 06-18-2005 08:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57