Irb weirdness

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

On 28.04.2008 19:43, Roger P. wrote:

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

On 28.04.2008 20:57, Roger P. wrote:

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

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.

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

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs