Cannot customize irb initialization

F

Fredrik

Why can't I give a configuration file as argument when I run irb? It
seems that looks for conf files in the order:
~/.irbrc
..irbrc
irb.rc
_irbrc
$irbrc

I would however like to have more flexibility than that. I would like
to be able to use a special conf file in whichever directory I am. Is
it only me who wants this flexibility? To me the ability to give a
conf file as argument seems like the most obvious argument to have in
irb.

Best regards,
Fredrik
 
J

Joel VanderWerf

Fredrik said:
Why can't I give a configuration file as argument when I run irb? It
seems that looks for conf files in the order:
~/.irbrc
.irbrc
irb.rc
_irbrc
$irbrc

I would however like to have more flexibility than that. I would like
to be able to use a special conf file in whichever directory I am. Is
it only me who wants this flexibility? To me the ability to give a
conf file as argument seems like the most obvious argument to have in
irb.

How about

irb -r config.rb

?
 
F

Fredrik

How about
irb -r config.rb
I tried that but it didn't work. I don't think irb treats the file
given by -r as a configuration. I runs what is written in the file as
if written by the user once irb has started.
 
J

Joel VanderWerf

Fredrik said:
I tried that but it didn't work. I don't think irb treats the file
given by -r as a configuration. I runs what is written in the file as
if written by the user once irb has started.

What do you mean by "treats as configuration"? How is the effect of -r
different?
 
F

Fredrik

I tried that but it didn't work. I don't think irb treats

Sorry, I'm crazy. I didn't realize that my config file should be named
config.rb instead of config.rc... What a silly mistake... Not it's all
working great!
 
N

Nobuyoshi Nakada

Hi,

At Thu, 19 Feb 2009 15:33:24 +0900,
Joel VanderWerf wrote in [ruby-talk:328701]:
How about

irb -r config.rb

?

Yet another way.

IRBRC=config.rb irb
 

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,780
Messages
2,569,610
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top