Setting IRB Configurations using env variables?

Discussion in 'Ruby' started by Narayanan K, Jun 17, 2010.

  1. Narayanan K

    Narayanan K Guest

    [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
    Narayanan K, Jun 17, 2010
    #1
    1. Advertising

  2. > 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/.
    Gabriel Horner, Jun 18, 2010
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ankit Mehta
    Replies:
    1
    Views:
    1,391
    Simon Brooke
    Sep 29, 2006
  2. Alex Maghen
    Replies:
    5
    Views:
    2,333
    Walter Wang [MSFT]
    Feb 5, 2008
  3. Sam Stephenson
    Replies:
    1
    Views:
    215
    Andrew Walrond
    Jun 18, 2005
  4. Replies:
    1
    Views:
    150
    Florian GroƟ
    Oct 26, 2005
  5. TDR
    Replies:
    3
    Views:
    163
    Daniel Berger
    Aug 31, 2007
Loading...

Share This Page