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