From: Pierre Baillet Date: 2002-11-01T01:07:49+09:00 Subject: Re: Readline Module and completion_proc Hello -- On Thu, Oct 31, 2002, ts wrote: > >>>>> "P" == Pierre Baillet writes: > > P> so completion_proc would be > P> Readline.complretion_proc = Proc.new{ |last_word, beginning| ... } > > Well, completion_proc is just an interface to the function > rl_attempted_completion_function() (see the doc of readline(3)) > Guy, you are perfectly right, however I think it should be possible to replace the call ary = rb_funcall(proc, rb_intern("call"), 1, rb_tainted_str_new2(text)); in static char ** readline_attempted_completion_function(text, start, end) in ext/readline/readline.c with a call that also provides rl_line_buffer to the Proc. OR maybe extending the Readline module to provide read access to rl_line_buffer at any time during the use of Readline. It don't which one is easier to implement. But as a matter of fact, C coders have access to this rl_line_buffer variable even when they are in the completion callback, haven't they ? Cheers, -- Pierre Baillet Quand on ne sait pas o� on va, il faut y aller.... et le plus vite possible. Devise Shadok