automatic indentation in the irb shell?

A

aidy

I might be asking a bit much, but is it possible to have automatic
indentation in the irb shell?

Aidy
 
G

gabriele renzi

aidy ha scritto:
I might be asking a bit much, but is it possible to have automatic
indentation in the irb shell?


put
IRB.conf[:AUTO_INDENT]=true
in your irbrc file, this should do the trick.
 
O

olleolleolle

Dear Aidy,

The file is called .irbrc (with a dot), and resides in your home
folder. ~/.irbrc as they say in UNIX-speak. If you are on Windows, I'm
not sure where that should live.
 
G

gabriele renzi

olleolleolle ha scritto:
Dear Aidy,

The file is called .irbrc (with a dot), and resides in your home
folder. ~/.irbrc as they say in UNIX-speak. If you are on Windows, I'm
not sure where that should live.

on win32 I have just set an IRBRC=\path\to\file env variable and it
works fine, I never investigated where my home was supposed to be :)
 
M

Mobody hackely

olleolleolle ha scritto:

on win32 I have just set an IRBRC=\path\to\file env variable and it
works fine, I never investigated where my home was supposed to be :)
[drive]:\documents and settings\[username]
I believe you can use _irbrc, as windows won't let you create .irbrc
through explorer. You can create it programatically though.

File.open( "C:\\documents and setting\\administrator\\.irbrc", "w" )
do |f|
f.puts "# Heres a comment"
end
 

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,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top