[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Readline: how to resurrect an old RCR?

Cs. Henk

3/4/2005 4:47:00 AM

Hi!

I'm about putting together a completion for irb which rocks. More
concretely, does context sensitive completion (filename completion
within a string, method name/variable completion elsewhere.

Very soon I got to the point that for this I'd need to acces the whole
line buffer from the completion proc. I looked around how to do this,
and soon I found the following among the old Rubygarden RCRs:

http://www.rcrchive.net/rc...

It's just about this thing, and also it gives a link to a ruby-talk post
with the right patch:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...

But it seems this RCR hasn't been reposted to RCRchive, so this nice
initiative got stalled. It would be nice to resurrect it.

What can be done? Should I myself re-submit the RCR? Or shall I just
drop a note to ruby-core that there is this patch, what do they think
about that?

The solution proposed there breaks backward compatibility, that's true
(although it's easy to fix): it makes one-argument completion procs cry.
This is a problem only if some package is not in the core ruby
distribution (as those can changed accordingly).

By the way, is there any readline-using application apart from irb?

Csaba


2 Answers

timsuth

3/6/2005 3:49:00 AM

0

In article <20050304044206.GH60344@beastie.creo.hu>, Cs. Henk wrote:
>Hi!
>
>I'm about putting together a completion for irb which rocks. More
>concretely, does context sensitive completion (filename completion
>within a string, method name/variable completion elsewhere.
[...]

Do you know that 'irb/completion' supports method/variable name completion?

Try "require 'irb/completion'" from within irb.

Csaba Henk

3/9/2005 3:57:00 AM

0

On 2005-03-06, Tim Sutherland <timsuth@ihug.co.nz> wrote:
> In article <20050304044206.GH60344@beastie.creo.hu>, Cs. Henk wrote:
>>Hi!
>>
>>I'm about putting together a completion for irb which rocks. More
>>concretely, does context sensitive completion (filename completion
>>within a string, method name/variable completion elsewhere.
> [...]
>
> Do you know that 'irb/completion' supports method/variable name completion?
>
> Try "require 'irb/completion'" from within irb.

Duh. Of course irb's current completion can complete method/variable
names perfectly. I put the emphasis on "context sensitive". Nevermind,
thanks.

Csaba