irb weirdness

Discussion in 'Ruby' started by Roger Pack, Apr 28, 2008.

  1. Roger Pack

    Roger Pack Guest

    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
     
    Roger Pack, Apr 28, 2008
    #1
    1. Advertising

  2. On 28.04.2008 19:43, Roger Pack wrote:
    > 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
     
    Robert Klemme, Apr 28, 2008
    #2
    1. Advertising

  3. Roger Pack

    Roger Pack Guest

    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.
     
    Roger Pack, Apr 28, 2008
    #3
  4. On 28.04.2008 20:57, Roger Pack 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
     
    Robert Klemme, Apr 28, 2008
    #4
  5. Roger Pack

    Roger Pack Guest

    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 :)
     
    Roger Pack, Apr 29, 2008
    #5
  6. Roger Pack

    Roger Pack Guest

    > 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.
     
    Roger Pack, Apr 29, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. steve
    Replies:
    4
    Views:
    533
    Brian van den Broek
    Mar 13, 2005
  2. Replies:
    1
    Views:
    90
    Csaba Henk
    Mar 12, 2005
  3. Sam Stephenson
    Replies:
    1
    Views:
    228
    Andrew Walrond
    Jun 18, 2005
  4. Replies:
    1
    Views:
    161
    Florian GroƟ
    Oct 26, 2005
  5. anne001
    Replies:
    1
    Views:
    277
    anne001
    Jun 27, 2006
Loading...

Share This Page