Issue with IRB and git bash on 1.9.2-p180

1.057 kali dilihat
Langsung ke pesan pertama yang belum dibaca

Stafford

belum dibaca,
25 Feb 2011, 23.26.5825/02/11
kepadaRubyInstaller
Hi
I'm having an issue using IRB inside git bash on 1.9.2-p180.
Essentially, I cannot use my left/right arrows, CTRL-A, CTRL-E,
Backspace, etc. This problem occurs only within IRB. If I start a
Rails console, it works as expected. It only occurs in 1.9.2. If I
use pik to switch to 1.8.7, irb behaves as expected. I have cleared
all .inputrc, .bashrc, .bash_profile, .irbrc, etc to be completely
barebones and it doesn't work. I tested a fresh install of 1.9.2-p180
and msysgit on a virtual machine and it didn't work. If I start irb
with the --noreadline switch, then I can use my backspace key and
arrow keys but all of my Ctrl commands don't work (since it isn't
using readline).

IRB works fine inside PowerShell or cmd.exe. It is only in Git bash
that I'm having these issues.

This is Win7 x64, msysgit 1.7.4 (also tried on 1.7.3.1 though), and
Ruby 1.9.2-p180.

I have also tried reinstalling readline from the Git repo to no avail.

Any help or suggestions are appreciated.

Luis Lavena

belum dibaca,
26 Feb 2011, 11.20.2526/02/11
kepadarubyin...@googlegroups.com
On Sat, Feb 26, 2011 at 1:26 AM, Stafford <wingr...@gmail.com> wrote:
> Hi

Hello,

> I'm having an issue using IRB inside git bash on 1.9.2-p180.
> Essentially, I cannot use my left/right arrows, CTRL-A, CTRL-E,
> Backspace, etc.  This problem occurs only within IRB.  If I start a
> Rails console, it works as expected.  It only occurs in 1.9.2.  If I
> use pik to switch to 1.8.7, irb behaves as expected.  I have cleared
> all .inputrc, .bashrc, .bash_profile, .irbrc, etc to be completely
> barebones and it doesn't work.  I tested a fresh install of 1.9.2-p180
> and msysgit on a virtual machine and it didn't work.  If I start irb
> with the --noreadline switch, then I can use my backspace key and
> arrow keys but all of my Ctrl commands don't work (since it isn't
> using readline).
>
> IRB works fine inside PowerShell or cmd.exe.  It is only in Git bash
> that I'm having these issues.
>

Starting with "irb" does not work, but starting it with "ruby -S irb"
works for me.

When you invoke "irb" it goes through 'env' (since irb shebang is
/usr/bin/env ruby)

Seems that is interfering with normal behavior.

Comparing environment variables between the two scenarios only raised
the following differences:
- "COLUMNS"=>"80",
+ "COLUMNS"=>"100",

- "LINES"=>"24",
+ "LINES"=>"3000",

- "_"=>"c:/Users/Luis/Tools/Ruby/ruby-1.9.2-p180-i386-mingw32/bin/irb"}
+ "_"=>"c:/Users/Luis/Tools/Ruby/ruby-1.9.2-p180-i386-mingw32/bin/ruby"}

I only found that workaround, but seems to me an obscure bug of
rb-readline, so I created the following issue:
https://github.com/luislavena/rb-readline/issues#issue/37

Thank you for your report.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Balas ke semua
Balas ke penulis
Teruskan
0 pesan baru