irb weirdness

R

Roger Pack

Has anybody else had this happen to them in irb?
You run something in irb that outputs to the screen without a terminating \n
then
the cursor ends up in weird places.
If you hit the up arrow it does weird, funky things
ex: [after running something that threw an exception, then hitting the up arrow]


from (irb):11>> Program.create :name => 'BSpment', :program_code =>
'BSIT', :is_online =>
kape_level_id => 6, :school => 3
^ the cursor is here.

Also another weirdness: sometimes in irb it 'disallows' you from
adding input to the end of whatever line you're typing on. [This may
or may not be associated with hitting ctrl-e to get to the end of the
line first]. You just can't type. Backspace works, forward typing
doesn't.

Thoughts?
-R
 
R

Robert Klemme

Has anybody else had this happen to them in irb?
You run something in irb that outputs to the screen without a terminating \n
then
the cursor ends up in weird places.
If you hit the up arrow it does weird, funky things
ex: [after running something that threw an exception, then hitting the up arrow]


from (irb):11>> Program.create :name => 'BSpment', :program_code =>
'BSIT', :is_online =>
kape_level_id => 6, :school => 3
^ the cursor is here.

Also another weirdness: sometimes in irb it 'disallows' you from
adding input to the end of whatever line you're typing on. [This may
or may not be associated with hitting ctrl-e to get to the end of the
line first]. You just can't type. Backspace works, forward typing
doesn't.

I would assume that this is less an issue of IRB but rather of the
combination terminal you are using and screen library. You did not
mention operating system, Ruby version and terminal type.

Kind regards

robert
 
R

Roger Pack

Good call.
Turns out that using xterm on the same computer and the bugs seem to
go away [versus OS X Terminal].

Seems to only happen in Terminal and I think in the win32 console.
Hmm.
-R
I would assume that this is less an issue of IRB but rather of the
combination terminal you are using and screen library. You did not mention
operating system, Ruby version and terminal type.
1.8.6.
 
R

Robert Klemme

Good call.
Turns out that using xterm on the same computer and the bugs seem to
go away [versus OS X Terminal].

Might be related to terminal type propagation via SSH (I am assuming you
tried remotely before). You can try to explicitly set TERM (e.g.
"export TERM=xterm" in a bash).
Seems to only happen in Terminal and I think in the win32 console.
Hmm.

Are you talking about different computers? First you mention Mac and
now Win...

Cheers

robert
 
R

Roger Pack

This is on Mac OS localhost.
I think you may have been onto something by blaming the Terminal
program itself, as it seems to work in xterm.
I mention windows as I believe I've run into this problem [and all the
time] running a console in windows, though I don't have one handy to
test my hypothesis.
Might be related to terminal type propagation via SSH (I am assuming you
tried remotely before). You can try to explicitly set TERM (e.g. "export
TERM=xterm" in a bash).
Unfortunately even this is not enough to help out OS X's terminal :)
 
R

Roger Pack

I think you may have been onto something by blaming the Terminal
program itself, as it seems to work in xterm.
In Eterm + os x the 'right arrow' bug is there but not the new line
difficulty. Weird.
 

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,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top