Readline: how to resurrect an old RCR?

C

Cs. Henk

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/rcr/show/126

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-talk/54796

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
 
T

Tim Sutherland

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.
 
C

Csaba Henk

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top