Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Win32::Console and IRB

Reply
Thread Tools

Win32::Console and IRB

 
 
Charles Roper
Guest
Posts: n/a
 
      09-24-2008
I'm using IRB with Wirble and Win32::Console in order to colorize the
output. The coloring works, but whenever I hit backspace, the character
to the left-1 gets eaten. E.g., if I type "test" and hit backspace, I'm
left with "te t" (obviously the last "t" there should have been the
character that got deleted).

I thought this might be caused by Wirble at first, so I disabled this
but the problem persisted. I tried disabling Win32::Console next and
this cleared the problem. So it seems that Win32::Console and IRB aren't
playing nicely together.

Can anyone suggest a fix to this?

Many thanks,
Charles
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Luis Lavena
Guest
Posts: n/a
 
      09-27-2008
Charles Roper wrote:
> I'm using IRB with Wirble and Win32::Console in order to colorize the
> output. The coloring works, but whenever I hit backspace, the character
> to the left-1 gets eaten. E.g., if I type "test" and hit backspace, I'm
> left with "te t" (obviously the last "t" there should have been the
> character that got deleted).
>
> I thought this might be caused by Wirble at first, so I disabled this
> but the problem persisted. I tried disabling Win32::Console next and
> this cleared the problem. So it seems that Win32::Console and IRB aren't
> playing nicely together.
>
> Can anyone suggest a fix to this?
>
> Many thanks,
> Charles


Hello Charles.

The problem is not win32console by itself, but IRB:

irb -f --noreadline

Disabling readline functionality solves the problem, but affects
autocompletion one, which is a bummer

Until someone can came up with a pure-ruby readline library that replace
the buggy C one, I think there is no easy solution.

Sorry for not being more helpful.

Regards,
--
Luis Lavena

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Charles Roper
Guest
Posts: n/a
 
      10-01-2008
Luis Lavena wrote:

> The problem is not win32console by itself, but IRB:
>
> irb -f --noreadline
>
> Disabling readline functionality solves the problem, but affects
> autocompletion one, which is a bummer


Hi Luis,

Many thanks for this. This solved the problem (I put
IRB.conf[:USE_READLINE] = false in my irbrc). I think I can live without
auto-complete for now. I guess I can always switch between the two
settings, depending on what I needs.

You're right though, it is a bummer.

Charles
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLAN routing and bridging problem on a c2600 usig IRB dinghy Cisco 0 11-15-2006 12:23 PM
irb require ... where does irb look? what path? anne001 Ruby 1 06-27-2006 12:07 PM
irb question - variable definitions when calling irb from a script problem Nuralanur@aol.com Ruby 1 10-26-2005 09:13 PM
[ANN] irb-history 1.0.0: Persistent, shared Readline history for IRB Sam Stephenson Ruby 1 06-18-2005 08:56 AM
Access Points and IRB David Williams Cisco 1 03-01-2004 08:48 PM



Advertisments