[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

automatic indentation in the irb shell?

aidy

4/20/2006 3:32:00 PM

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

Aidy

5 Answers

gabriele renzi

4/20/2006 5:13:00 PM

0

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.

aidy

4/21/2006 9:58:00 AM

0

Hi,
> in your irbrc file

I have done a full search on *irbrc* and nothing is returned. I am
using ruby-1.8.4.

Cheers

Aidy

olleolleolle

4/21/2006 11:41:00 AM

0

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.

gabriele renzi

4/21/2006 9:03:00 PM

0

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 :)

Mobody hackely

4/22/2006 1:54:00 PM

0

On Fri, 21 Apr 2006 21:03:12 GMT, gabriele renzi
<surrender_itRemove@yahoo.it> wrote:

>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 :)
[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