[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

irb without history?

Daniel Schüle

6/19/2005 11:03:00 PM

Hello NG,

this is my first posting
I was playing a little with ruby and irb today
what is a little annoying is reentering commands
on the interpreter (irb)
I know and use often Python interactive interpreter
for some quick calculations
Is there a way to let irb remember the entered commands
like in Python?

irb -v
irb 0.9(02/07/03)

is it out if date?

thx for help and advice

Daniel

8 Answers

Assaph Mehr

6/19/2005 11:36:00 PM

0

Daniel Schüle

6/20/2005 12:01:00 AM

0

well, I dont want to maintain history through the sessions
sorry if I was unclear about it

irb(main):001:0> i=0
=> 0
irb(main):002:0>
irb(main):003:0* ^[[A

I get ^[[A when I press ArrowUp key
I would like "i" to show up instead

strace -e open irb
tells me that at least irb opens ~/.irbrc file

thx in advance

Assaph Mehr

6/20/2005 12:49:00 AM

0



Daniel Schüle wrote:
> well, I dont want to maintain history through the sessions
> sorry if I was unclear about it
>
> irb(main):001:0> i=0
> => 0
> irb(main):002:0>
> irb(main):003:0* ^[[A
>
> I get ^[[A when I press ArrowUp key
> I would like "i" to show up instead

Looks like a readline problem. What OS/Ruby version are you using?
(try: ruby -v).
If this is indeed a readline problem, you may need to enable readline
and recompile (assuming you're on *nix). It's been a while for me, so
maybe someone else here can help more.

HTH,
Assaph

acharlieblue

6/20/2005 2:08:00 AM

0


Daniel Schüle wrote:
> well, I dont want to maintain history through the sessions
> sorry if I was unclear about it
>
> irb(main):001:0> i=0
> => 0
> irb(main):002:0>
> irb(main):003:0* ^[[A
>
> I get ^[[A when I press ArrowUp key
> I would like "i" to show up instead

That looks like Ruby didn't get properly linked with Readline when it
was built.

Daniel Schüle

6/20/2005 12:55:00 PM

0

> Looks like a readline problem. What OS/Ruby version are you using?
> (try: ruby -v).

mond:~ # ruby -v
ruby 1.8.0 (2003-08-04) [i686-linux]
mond:~ # irb -v
irb 0.9(02/07/03)
mond:~ #

mond:~ # uname
Linux
mond:~ # uname -r
2.4.21-99-default

SuSE 9.0

> If this is indeed a readline problem, you may need to enable readline
> and recompile (assuming you're on *nix). It's been a while for me, so
> maybe someone else here can help more.

I will try to get the source and recompile

James Gray

6/20/2005 4:09:00 PM

0

On Jun 20, 2005, at 8:10 AM, Daniel Schüle wrote:

>> If this is indeed a readline problem, you may need to enable readline
>> and recompile (assuming you're on *nix). It's been a while for me, so
>> maybe someone else here can help more.
>>
>
> I will try to get the source and recompile

Fair warning: Silly question here.

Have you tried launching irb with the --readline switch?

James Edward Gray II

Daniel Schüle

6/20/2005 4:21:00 PM

0

James Edward Gray II wrote:
> On Jun 20, 2005, at 8:10 AM, Daniel Schüle wrote:
>
>>> If this is indeed a readline problem, you may need to enable readline
>>> and recompile (assuming you're on *nix). It's been a while for me, so
>>> maybe someone else here can help more.
>>>
>>
>> I will try to get the source and recompile

now I tried but unfortunately the problem remains
../configure --help
seems to have no option where I could "--enable-readline"


> Fair warning: Silly question here.
>
> Have you tried launching irb with the --readline switch?

no, I didn't

mond:/pool/installed/ruby/ruby1/bin # ./irb --readline
irb(main):001:0> i=0
=> 0
irb(main):002:0> ^[[A

seems not to work :-/

I am not a Linux expert and cannot tell for sure whether this
is ruby or OS related problem
Is there somebody who didn't have this problem on Linux,
especially SuSE distro?



Mike Painter

7/27/2011 8:05:00 AM

0

Uno Hu wrote:
> "Mike Painter" <md.painter@sbcglobal.net> wrote in message
> news:WbadnUuUtrAHRrDTnZ2dnUVZ5hWdnZ2d@giganews.com
>
>> Tracey12 wrote:
>>> America has often been criticized for its openness. We normally
>>> talk about everything but the most super critical issues of our
>>> time. Something happened. That has changed now.
>>>
>>> Much more is becoming secret and kept from any discussion in the
>>> open.
>>>
>>> This is not good. We the People must know what is going on so that
>>> we can vote for the right person who will explain how he / she is
>>> going to deal with said issue.
>>
>> Well, if you are aware of this then it can't be much of a secret can
>> it? Contrary to your opinion and *especially* in the government
>> people who have secrets don't talk about them.
>> They don't even acknowledge that there may be a secret even if it is
>> staring you in the face.
>>
>
> Obummah's promised 'Most transparent administration ever'.. has turned
> out to be one of the most secretive.. ever.

And how do you know of these secrets?
And if you know about it how can it be a secret?

I have personal experience with drafted US soldiers who worked in an
enclosed compound where I was stationed in Germany.
They hated the army as much as I did.
Drunk or sober they did not talk about what they did.